sql server delete records with specific date 1

sql server delete records with specific date

DELETE FROM tableName WHERE [DateTime] = CAST('7/3/2014 3:35:26 PM' AS DateTime)

Here is what the above code is Doing:
1. We’re creating a connection to the database.
2. We’re creating a cursor object.
3. We’re executing the SQL query.
4. We’re committing the changes to the database.
5. We’re closing the connection to the database.

Similar Posts