Adding primary key for not null column
mysql>
mysql> CREATE TABLE person
-> (
-> tax_id INT UNSIGNED NOT NULL,
-> last_name CHAR(20),
-> first_name CHAR(20),
-> address CHAR(40),
-> PRIMARY KEY (tax_id)
-> );
Query OK, 0 rows affected (0.00 sec)
mysql>
mysql> drop table person;
Query OK, 0 rows affected (0.00 sec)
Related examples in the same category