insert into color select color1,color1,color1 from color where color1 not in (select color1 from color)insert into color select color1,color2,color2 from color where color2 not in (select color2 from color)
sorry: insert into color select color1,color1,color1 from color where color1<>color2 insert into color select color1,color2,color2 from color where color2<>color3
insert into color select color1, color1, color1 from color where color1 not in (select color2 from color ) union select color1, color2, color2 from color where color2 not in (select color3 from color)
color1 color2 color3 ---------- ---------- ---------- Red Red Red red Blue Yellow white green white black blue green black black black black blue blue red Blue Blue white white white
insert into color
select color1,color1,color1
from color
where color1<>color2 insert into color
select color1,color2,color2
from color
where color2<>color3
select color1, color1, color1 from color
where color1 not in (select color2 from color )
union select color1, color2, color2 from color
where color2 not in (select color3 from color)
---------- ---------- ----------
Red Red Red
red Blue Yellow
white green white
black blue green
black black black
black blue blue
red Blue Blue
white white white
怎么都是
select color1,color1,colo1 .....呀
是不是写错了呀
应该是
select color1,color2,color3....呀
To aht1979(蓝色雪狐)你是哪里看来的题目阿
一家公司给的
既然你知道,就麻烦你指点指点了