title: populating a link table in a script - SQL
body: <p>so i have a script like this:</p>
  <pre><code>CREATE TABLE person
  (
      id SERIAL PRIMARY KEY,
      name VARCHAR(80)
  )
  
  CREATE TABLE nationality
  (
      id SERIAL PRIMARY KEY,
      name VARCHAR(80)
  )
  
  INSERT INTO person (name) VALUES ('John');
  INSERT INTO person (name) VALUES ('Fred');
  INSERT INTO person (name) VALUES ('Mary');
  INSERT INTO person (name) VALUES ('Jane');
  
  INSERT INTO nationality (name) VALUES ('Canadian');
  INSERT INTO nationality (name) VALUES ('American');
  
  CREATE TABLE person_nationality
  (
      id SERIAL PRIMARY KEY,
      person_id INTEGER,
      nationality_id INTEGER
  )
  </code></pre>
  <p>The final table is a link table to link people to nationalities. Is there a way to auto populate this? like I know the first three should be linked to Canadian and the final one should be American. But I dont know how to make a script to do this.</p>