第1个回答 推荐于2017-04-12
直接在语句里加上库名吧,就不用再加USE了。
create table myku.dbo.mybiao(id int,username nvarchar(50),userpass nvarchar(50))本回答被提问者采纳
第2个回答 2009-06-29
--看mybiao是否存在,如果存在则删除此表;
if exists(select * from sysobjects where name='mybiao')
drop table mybiao;
go
--创建mybiao;
create table mybiao(
id int,
username varchar(50),
userpass varchar(50)
)
go
希望能到你.。
第3个回答 2009-06-29
use myku
go
create table mybiao
(
id int primary key identity(1,1),
username varchar(20) not null,
userpass varchar(20) not null
)
第4个回答 2020-04-08
create
table
学生
(
学号
char(8)
primary
key,
--主键
姓名
varchar(8)
not
null
unique,--不为空,不能重复
性别
char(2)
check(性别
in('男','女'))
default
'男'
not
null,--只能是男或女,默认是男
出生日期
datetime
not
null,--不为空
身高
int
check(身高>0
and
身高<300),--只能在0到300
之间
籍贯
varchar(12)
not
null,
专业
varchar(10)
not
null
)