create table tb_user
(uid int,
name varchar(20)
)
alter table tb_user
add constraint 主键名
primary key(uid)
use 数据库名
if exists ( select *
from sysobjects
where name = ' tb_user'
and type = 'U')
drop table tb_user
go
create table tb_user
(uid int primary key,
name char(20))
create table tb_user(uid int(10) not null auto_increment primary key,
name varchar(20)) engine = myisam defualt charset=utf8
MYSQL建表语句:
create table tb_user(uid int(10) not null auto_increment primary key,
name varchar(20)) engine = myisam defualt charset=utf8;
create table 数据库名
(
uid int primary key,
uname varchar(20)not null
)