答案 0 :(得分:0)
无法制作"单线间隙", 但是你可以在table1和table2之间建立一个带有空/空或一些相似值的联合。代码将是这样的:
SELECT A,B,C,D
FROM table1
UNION
SELECT'-', '-', '-', '-'
UNION
SELECT E,F,G,H
FROM table2
答案 1 :(得分:0)
虽然总的来说我同意@ MarcB关于格式化输出的评论,但是,这种类型的格式化实际上可以在使用联合的sql中实现:
SELECT A,B,C,D FROM table1
UNION
SELECT "", "", "", ""
UNION
SELECT "E", "F", "G", "H"
UNION
SELECT E,F,G,H FROM table2
答案 2 :(得分:0)
您还需要一个分隔符字段以避免“混淆”和Union All
:
SELECT 1 As Separator,A,B,C,D
FROM table1
UNION ALL
SELECT 2 As Separator,'-', '-', '-', '-'
UNION ALL
SELECT 3 As Separator,E,F,G,H
FROM table2
ORDER BY Separator