Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
raindear
Yak Posting Veteran
64 Posts |
Posted - 2014-05-27 : 08:17:50
|
Have been given this code to create a tableCREATE TABLE 'emaillist' ( 'id' INT(11) NOT NULL AUTO_INCREMENT, 'clientname' VARCHAR(200) NOT NULL DEFAULT '0', 'email' VARCHAR(200) NOT NULL DEFAULT '0', PRIMARY KEY ('id'));when I execute it saysMsg 102, Level 15, State 1, Line 1Incorrect syntax near 'emaillist'.Any idea what the correct code should be? |
|
webfred
Master Smack Fu Yak Hacker
8781 Posts |
Posted - 2014-05-27 : 08:38:24
|
This looks like MySQL.We are on MS SQL Server only here. Too old to Rock'n'Roll too young to die. |
 |
|
GouravSaxena1987
Starting Member
23 Posts |
Posted - 2014-05-27 : 13:09:57
|
Check it SET QUOTED_IDENTIFIER is ON/OFFIt should be on for execute your query in SQL Server and since it doesn't allowed to have name with " ' " , you have to replance single quote (') with double quote (").Regards,Gourav SaxenaData Warehouse CounsultantGouravSaxena1987@gmail.com |
 |
|
jackv
Master Smack Fu Yak Hacker
2179 Posts |
Posted - 2014-05-28 : 01:38:44
|
It's MySQL, should work without the ''Jack Vamvas--------------------http://www.sqlserver-dba.com |
 |
|
|
|
|