[SQL ] 语法求教,多字段值如何有条件变成多笔row

楼主: jonce007 (汪汪)   2016-09-05 16:51:45
数据库版本:mysql 5.x
内容/问题描述: 将不为空白的字段们变成多笔资料
表格a内,有三组no&amt
其中第一组 no1,amt1必有资料,
第二及第三组可能有值也可能空白
table a
作者: meteor09887 (0~星~0)   2016-09-06 12:26:00
感觉你的问题用union就可以解了只是我不太懂为什么要<>''
楼主: jonce007 (汪汪)   2016-09-06 18:49:00
空=没资料不必展开。union要扫table三次,希望一次就好

Links booklink

Contact Us: admin [ a t ] ucptt.com