what is the query to delete first row in table

Posted by Kannan1986 under Sql Server on 2/19/2010 | Views : 2530 | Status : [Member] | Replies : 1
what is the query to delete first row in table

i have table with four column.. username , datetime,address


first when i insert first record, i have to check whether username available or not , if user name is not available , the record will insert..

if the same user insert their record .. i have to check the condition

if username not equal to 5 , the record will insert


if username equal to 5 , i have to delete first record based on the first datetime value


Posted by: Abhi2434 on: 2/19/2010 [Member] [Microsoft_MVP] [MVP] Silver

What is the problem with this, I guess you need to implement your logic within a stored procedure. Just take all the parameters to the stored proc and insert data based on your own logic from within the SP.


Kannan1986, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response