what is the query to delete first row in table

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

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

condition.

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

else

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




Responses

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

Up
0
Down
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.



www.abhisheksur.com

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

Login to post response