1,
insert into color
select color1,color1 as color2,color1 as color3 from color where color2 not in (select color1 from color)
insert into color
select color1,color1 as color2,color1 as color3 from color where color2 not in (select color1 from color)
select color1,color2,color2 as color3 from color
where color2 not in (select color3 from color)
insert into color
select color1,color2 ,color3 = color2
from color
where color2 not in(select color3 from color)
select color1,color1 as color2,color1 as color3 from color where color2 not in (select color1 from color)
unoin
select color1,color2,color2 as color3 from color
where color2 not in (select color3 from color)
这样一句行吗?
select color1,color1 as color2,color1 as color3 from color where color1 not in (select color2 from color)
unoin
select color1,color2,color2 as color3 from color
where color2 not in (select color3 from color)这样就对了,^_^,谢谢
中color1的颜色,而不color2的颜色
insert #t values('red', 'Blue', 'Yellow')
insert #t values('white', 'green', 'white')
insert #t values('black', 'Blue', 'green')
1.insert #t
select color1,color1 as color2 ,color1 as color3
from #t
where color1 not in (select color2 from #t)2 insert #t
select color1,color2 ,color2 as color3
from #t
where color2 not in (select color3 from #t)