All pastes #370136 Raw Edit

Mine

public text v1 · immutable
#370136 ·published 2007-02-24 07:38 UTC
rendered paste body
mysql> CREATE TABLE nicks (nick VARCHAR(30), pilot VARCHAR(30) NOT NULL, PRIMARY KEY (nick), FOREIGN KEY (pilot) REFERENCES pilots(pilot) ON DELETE CASCADE);
Query OK, 0 rows affected (0.01 sec)

mysql> select * from pilots;
Empty set (0.01 sec)

mysql> insert into nicks values ('a', 'b');
Query OK, 1 row affected (0.00 sec)

mysql> select * from nicks;
+------+-------+
| nick | pilot |
+------+-------+
| a    | b     |
+------+-------+
1 row in set (0.00 sec)

mysql>