sqlserver2017用户表

--create database mydata;
--use mydata;
drop table t_user;
create table t_user(
	username nvarchar(10) not null default N'username',	unique(username),
	userpass nvarchar(10) not null default N'password',
	userdate date not null default getdate(),
	usertime time not null default getdate(),
	useriden uniqueidentifier not null default newid(),	primary key(useriden)
);
insert into t_user (username, userpass) values (N'张三', N'zs123');
insert into t_user (username, userpass) values (N'李四', N'ls456');
insert into t_user (username) values (N'王五');
insert into t_user (userpass) values (N'666');

select * from t_user order by username asc

你可能感兴趣的:(sqlserver2017用户表)