标签:where origin limit HERE AMM select null 指定 inf
我们在做报表的时候,经常遇到这种情况:表格行数固定,用户输入的行数不确定,空白的地方需要用指定字符补齐,如:
如何用mysql实现?
SELECT
taskNo,a4,orderNo
FROM
(
SELECT
taskNo,a4,orderNo
FROM
rep_ammeteroriginal t1 where orderNo in(1)
UNION all SELECT '此栏一下空白',NULL,NULL FROM rep_ammeteroriginal t3 limit 1
UNION all SELECT NULL,NULL,NULL FROM rep_ammeteroriginal t3
UNION all SELECT NULL,NULL,NULL FROM rep_ammeteroriginal t3
UNION all SELECT NULL,NULL,NULL FROM rep_ammeteroriginal t3
UNION all SELECT NULL,NULL,NULL FROM rep_ammeteroriginal t3
) t2
LIMIT 5;
标签:where origin limit HERE AMM select null 指定 inf
原文地址:https://www.cnblogs.com/zhuxiang1633/p/12296145.html