I'm just learning how to use MySQL and I am searching for a more simple way
of doing an INSERT query into multiple tables simultaneously.
I have done my best to nominalize my DB but that creates but I'm confused as
to how to insert data into the DB and have all the related table be updated.
I think that I can work out some way using conditional statements in PHP to
insert the data into all the records, but I'm thinking there must be a more
elegant and faster way of doing this.
e.g.
table people
1 Bryan student
2 Jill teacher
3 Bob student
table job
1 student
2 teacher
If I want to insert a record to table PEOPLE :
insert into people values('4', 'Jon', doctor)
How can I do this without having to also do a separate insert into table
JOB?
You need to Understand the rules so you can break them intelligently,"
the Dalai Lama

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.