Link to home
Start Free TrialLog in
Avatar of Michael2008
Michael2008Flag for United States of America

asked on

SQL code to delete one specific record from a table?

What would be the SQL code to delete the record in a table containing a specific ID 1 and ID 2 dual primary key in MS Access 2003?
Avatar of Jim Horn
Jim Horn
Flag of United States of America image

{Access}
DELETE * FROM YourTable WHERE ID IN (1, 2)

Never heard of a 'dual primary key'.  Can you give me a 'for example'?
Avatar of Michael2008

ASKER

I don't know what you Access Gurus call it, but i call it a dual primary key, where you have 2 fields as the primary key, so you can have repeats in a single field, but no duplicate combinations.  See example db if you want an example
Dual-Primary-Key-Example.mdb
ASKER CERTIFIED SOLUTION
Avatar of Jim Horn
Jim Horn
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Worked like a charm; thanks for the help.
Thanks again