use master
go
drop database mydata
go
create database mydata
go
use mydata
go
create table t_user
(
userguid uniqueidentifier not null default newid(),
username nvarchar(max) not null default N'',
userpassword nvarchar(max) not null default N'',
createdatetime smalldatetime not null default getdate(),
lastalterdatetime smalldatetime not null default getdate(),
a1 bit not null default 0,
a2 bit not null default 0,
a3 bit not null default 0,
a4 bit not null default 0,
b1 bit not null default 0,
b2 bit not null default 0,
b3 bit not null default 0,
b4 bit not null default 0,
c1 bit not null default 0,
c2 bit not null default 0,
c3 bit not null default 0,
c4 bit not null default 0,
d1 bit not null default 0,
d2 bit not null default 0,
d3 bit not null default 0,
d4 bit not null default 0,
primary key (userguid),
)
insert into t_user (username, userpassword) values (N'张三', N'zs123')
insert into t_user (username, userpassword) values (N'里斯', N'as645df')
insert into t_user (username, userpassword) values (N'aaa', N'asdsdf')
insert into t_user (username, userpassword) values (N'a', N'b')
select * from t_user where username = 'AAA'
select * from t_user
create table t_admin
(
adminguid uniqueidentifier not null default newid(),
adminname nvarchar(max) not null default N'',
adminpassword nvarchar(max) not null default N'',
createdatetime smalldatetime not null default getdate(),
lastaltertime smalldatetime not null default getdate(),
primary key (adminguid)
)
insert into t_admin (adminname, adminpassword) values (N'admin', N'admin')
select * from t_admin
sqlserver2014建表uuid
最新推荐文章于 2024-08-14 09:42:18 发布