Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我只想知道如何接收包含空行的所有列名(不是空表本身)
它们都有一些行,但没有填充任何数据。
有任何想法吗?
您可以通过
SELECT * FROM table WHERE column1='' AND column2=''
如果“”是您所说的空行
怎么样:
SELECT COALESCE(NULLIF(SomeColumn,''), ReplacementColumn) FROM SomeTable
您也可以将其扩展到 3 列:
SELECT COALESCE(NULLIF(Address2,''), NULLIF(Address3,''), Address4)