General information
Category:
Coding, syntax & commands
Hi all,
Was wondering, is there any way of using two primary keys in sync in the one table?? I am using a a table to store information on bookings, and in the table, it should store customer details, time, date, etc.
I can't have the primary key as "date" alone, as I will have more than one customer on any one day, and I also can't have "time" as a primary key alone, as I will have customers on different dates at the THAT time. E.G.
customer1 12.00 02-03-2003
customer2 14.00 02-03-2003
customer3 12.00 02-04-2003
My problem is, I need to link these two fields("time" and "Date") so that they together make up a primary key, so that there is no time (which is usually hourly, as it's for a sports centre) AND date which is identical to another time AND date in that table.
Can I have corresponding primary keys in the same table or do I need to go about it a different way????
All suggestions welcomed.
Thanks in advance,
Mick
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only