How to run the sql scripts only once ?
For eg. If a table has 1 lakh records. If i run the script it will update the 1 lakh records. Now, if i run the script again it should not execute becouse it was already executed and also the table should not update? please help

Nilesh ShahPosted Aug 9, 2017, 9:10 AM
by default there is no statement/mechanism in SQL server which can do this.
let's say you want to execute only once in 24 hours, then you can have a table which store last timestamp when thequery was executed. in your query in very first line you chech this table, if that timestamp is less than 24 hours then query exits without doing anything.
Gokhul VarmanPosted Aug 9, 2017, 8:49 AM