sqlserver 建表语句:create table tb_user(uid int primary key,name varchar(20)) Mysql怎么写。详细点哈

2025-01-20 21:50:11
推荐回答(5个)
回答1:

create table tb_user
(uid int,
name varchar(20)
)

alter table tb_user
add constraint 主键名
primary key(uid)

回答2:

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))

回答3:

create table tb_user(uid int(10) not null auto_increment primary key,
name varchar(20)) engine = myisam defualt charset=utf8

回答4:

MYSQL建表语句:
create table tb_user(uid int(10) not null auto_increment primary key,
name varchar(20)) engine = myisam defualt charset=utf8;

回答5:

create table 数据库名

uid int primary key,
uname varchar(20)not null