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.

 All Forums
 SQL Server 2008 Forums
 Transact-SQL (2008)
 shows error: Incorrect syntax near 'transaction'.

Author  Topic 

rj.innovative
Starting Member

1 Post

Posted - 2011-07-23 : 15:48:11
After making table, when i execute this command-

select * from dbo.transaction

it shows error: incorrect syntax near 'transaction'.
other tables in my db are correctly working.

webfred
Master Smack Fu Yak Hacker

8781 Posts

Posted - 2011-07-23 : 15:59:35
transaction is a bad word for a tablename :)
You can do this:
select * from dbo.[transaction]


No, you're never too old to Yak'n'Roll if you're too young to die.
Go to Top of Page

GilaMonster
Master Smack Fu Yak Hacker

4507 Posts

Posted - 2011-07-24 : 05:34:46
Transaction is a reserved word, hence why it has to be in [] and why it's a bad name for a table.

--
Gail Shaw
SQL Server MVP
Go to Top of Page
   

- Advertisement -