Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Removing data from tables

Status
Not open for further replies.

prg1

Technical User
Feb 24, 2003
2
GB
I have so far failed to come up with an adequate way of deleting certain rows of data from a table.

I have two entities, Emp_No and Emp_Name. Along with this i Have one more, D_of_B.

How can i delete an Employee's Employee number and name if their Date of Birth is after 31-12-1980? Every time i've tried the program ends up deleting either the wrong data or all of it! It's driving me mad!!
 
Assuming your database recognizes '31-12-1980' as a date, then
DELETE FROM my_table WHERE d_of_b > '31-12-1980' should do the trick.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top