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 |
|
S_Lakshmi
Starting Member
22 Posts |
Posted - 2008-06-13 : 10:02:27
|
Hi,I just execute the following statement Delete top 1 from <table name> it is giving the error "incorrect syntax near 1"But this statement is working fine .Delete top (1) from <table name> What is the differance between these statements..?Can any can explian me..ThanksLakshmi.S |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2008-06-13 : 10:17:07
|
| Delete Top ........ is introduced in SQL Server 2005. So you need to use braces around the numberMadhivananFailing to plan is Planning to fail |
 |
|
|
S_Lakshmi
Starting Member
22 Posts |
Posted - 2008-06-13 : 10:29:12
|
quote: Originally posted by madhivanan Delete Top ........ is introduced in SQL Server 2005. So you need to use braces around the numberMadhivananFailing to plan is Planning to fail
Could you explian little bit more? It means the newly intorduced querys should use braces in MS SQl 2005.Lakshmi.S |
 |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2008-06-13 : 10:49:15
|
quote: Originally posted by S_Lakshmi
quote: Originally posted by madhivanan Delete Top ........ is introduced in SQL Server 2005. So you need to use braces around the numberMadhivananFailing to plan is Planning to fail
Could you explian little bit more? It means the newly intorduced querys should use braces in MS SQl 2005.Lakshmi.S
Look at syntax of DELETE statement in books online and you will see why () is requiredhttp://msdn.microsoft.com/en-us/library/ms189835.aspx |
 |
|
|
|
|
|