选择With Union In SQL

时间:2017-02-10 09:04:23

标签: sql

为什么我在sql中运行语法并且结果将是双数据?

命令是:

c.ChanID | c.name | s.ChanID
1        | first  | 1
2        | second | NULL       <-- the second and third channels don't match
3        | third  | NULL       <-- to anything in the SUBSCRIBERS table (IS NULL)
4        | fourth | 4

命令中的错误是什么?谢谢你的帮助。

1 个答案:

答案 0 :(得分:1)

UNION ALL将合并两个select的结果中的重复行,更改

  

UNION ALL

  

UNION

这将从结果中删除重复的行

相关问题