我从书上看来说
关系数据库的每一行都是不同的但为什么create table x
(
col int
)
insert x select 1
union all
select 1
select * from x这样却又能正常运行有点有理解
关系数据库的每一行都是不同的但为什么create table x
(
col int
)
insert x select 1
union all
select 1
select * from x这样却又能正常运行有点有理解
概念不能理解的这么死!一定要变通...再说啦,这样 create table x(col int) 没有指定 col 的唯一性!所以能够插入成功啦...换成这样就会出错了!create table x
(
col int primary key --添加唯一性
)
insert x select 1
union all
select 1
select * from x