Avatar of Michael2008
Michael2008
Flag 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?
SQL

Avatar of undefined
Last Comment
Michael2008

8/22/2022 - Mon
Jim Horn

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

Never heard of a 'dual primary key'.  Can you give me a 'for example'?
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
Jim Horn

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
Michael2008

ASKER
Worked like a charm; thanks for the help.
I started with Experts Exchange in 2004 and it's been a mainstay of my professional computing life since. It helped me launch a career as a programmer / Oracle data analyst
William Peck
Michael2008

ASKER
Thanks again