t_user用户表sql

版权声明: https://blog.csdn.net/eds124/article/details/85867338
--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',
	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,
	userdate date not null default getdate(),
	usertime time not null default getdate(),
	p_userid uniqueidentifier not null default newid(),	primary key(p_userid)
);
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 count(*) from t_user where username = @username and userpass = @userpass
select * from t_user order by username asc

猜你喜欢

转载自blog.csdn.net/eds124/article/details/85867338