| | |
Delete Rows
Please support our MS SQL advertiser: Intel Parallel Studio Home
![]() |
•
•
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; 14 Days Ago at 4:39 am. Reason: Keep It Organized - For easy readability, always wrap programming code within posts in [code] (code blocks)
0
#2 21 Days Ago
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 19 Days Ago
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?
| Thread Tools | Search this Thread |






