本文转自:http://blog.chinaunix.net/uid-17079336-id-2832443.html 1.创建表的同时创建主键约束(1)无命名create table student (studentid int primary key not null,studentname varchar(8),age int);(2)有命名create table students (studentid int ,studentname varchar(8),age int,constr…