| | |
Delete Rows
Please support our MS SQL advertiser: PostgreSQL or MySQL? Compare and contrast the two most popular open source databases
![]() |
•
•
Join Date: Nov 2009
Posts: 1
Reputation:
Solved Threads: 0
Hi
I wonder how I do to remove usersid from 1915 to 1945 for example in MS Sql?
When i add that i get this message:
Msg 156, Level 15, State 1, Line 2
Incorrect syntax near the keyword 'to'.
Msg 156, Level 15, State 1, Line 3
Incorrect syntax near the keyword 'to'.
Can someone please tell me what is wrong?
I wonder how I do to remove usersid from 1915 to 1945 for example in MS Sql?
sql Syntax (Toggle Plain Text)
DELETE FROM [dbo].[user] WHERE user ID = 1915 to userID 1945
When i add that i get this message:
Msg 156, Level 15, State 1, Line 2
Incorrect syntax near the keyword 'to'.
Msg 156, Level 15, State 1, Line 3
Incorrect syntax near the keyword 'to'.
Can someone please tell me what is wrong?
Last edited by peter_budo; Nov 15th, 2009 at 4:39 am. Reason: Keep It Organized - For easy readability, always wrap programming code within posts in [code] (code blocks)
0
#2 Nov 8th, 2009
MS SQL Syntax (Toggle Plain Text)
DELETE FROM User WHERE UserId >= 1915 AND UserId <= 1945
There is also a
BETWEEN operator you could use. 0
#3 Nov 10th, 2009
Also you can write:
MS SQL Syntax (Toggle Plain Text)
DELETE FROM User WHERE UserId BETWEEN 1915 AND 1945
MARK AS SOLVED if its help you.
REGARDS
MCTS - Shawpnendu bikash maloroy
http://shawpnendu.blogspot.com
REGARDS
MCTS - Shawpnendu bikash maloroy
http://shawpnendu.blogspot.com
![]() |
Similar Threads
- Delete rows from database (MySQL)
- Javascript- Hoe to delete rows by id. (JavaScript / DHTML / AJAX)
- Change and delete rows in a sql-database (Java)
- How do i get a datagrid to update & delete rows. (ASP.NET)
- Delete Rows in dataGridView (C++)
- Delete all rows from table in javascript (JavaScript / DHTML / AJAX)
Other Threads in the MS SQL Forum
- Previous Thread: Smart Searches
- Next Thread: is there a way to make an image data type as index?
Views: 573 | Replies: 2
| Thread Tools | Search this Thread |
Tag cloud for MS SQL
"last age autogrowth business connectingtodatabaseinuse count cursor data database dateadd datediff datepart day" dbsize deadlock delete_trigger exploit getdate hack highperformancecomputing hpc hpcserver2008 ibm iis limit live loop maximum microsoft ms mssql multiple multithreading news number password permission position query reporting result security server services sets single source sql sql-injection sqlserver sqlserver2005 subtype supercomputing supertype tables uniqueid update view weekday






