I am using visual studio 2008 with my database in sql server 2005.
I have created a chat online app. Once the user is online he/she can chat and his/her chat data will go in my message database which has this schema.
- MessageID(pk)
- RoomID
- UserID
- ToUserID
- Text
After the chatter finishes chat he log’s out and
the messages sent by the “UserID” or say chat data in message table of that USerID must be deleted.
So
I want to delete multiple rows from the database at once.
Something like the following should help:
Note: You can have a where clause in your delete statement using which you can specify the delete criteria.