I’m sorry for this noob question.
There’re 2 tables: the smaller one is derived from bigger one.
How do i insert new record into bigger table??
INSERT INTO people (lname, fname, city, age, salary) VALUES (' Doe','John','Paris', '25','1000$' );
but bigger table contains city as number. How should i insert ‘Paris’?? Should i know its number beforehand?? But ‘Paris’ isn’t in Cities (smaller) table!!
How do records get inserted in bigger (people) table??
EDIT:
Added
IFblock to check for Paris.I made an assumption about the structure of the
citytable obviously.You could also parameterize this with a
@cityvariable and sub that for'Paris'everywhere in the code.