摘要:
查询没有地址的人(地址为null)-- null值不能使用 = 比较-- is是 is not不是select * from stu where address is null; --查询有邮箱的select * from stu where email is not null; --查询有家有邮箱 阅读全文
posted @ 2022-05-25 20:36
百变小新
阅读(148)
评论(0)
推荐(0)
摘要:
create table tb_user( --列名 类型 约束 uid int primary key identity, uname varchar(20) not null, upwd varchar(16) not null default '888888', usex varchar(2) 阅读全文
posted @ 2022-05-25 20:35
百变小新
阅读(47)
评论(0)
推荐(0)
摘要:
数据库放表表放数据 【表有列名,列还得有数据类型】 表约束 主键约束:值不能为null,且不能重复 非空约束:不能为null 默认约束:默认为xx 检查check约束:判断(男和女) 唯一约束:不能重复,能为null 外键约束:不讲 字符全部都是 单引号 '或者 or , 并且 and sql操作: 阅读全文
posted @ 2022-05-25 20:32
百变小新
阅读(59)
评论(0)
推荐(0)