我认为必须有一个特定的设计理由,为什么你不能编写如下的查询:
select
(select column_name
from information_schema
where column_name not like '%rate%'
and table_name = 'Fixed_Income')
from Fixed_Income
Run Code Online (Sandbox Code Playgroud)
而不得不求助于动态SQL.
谁知道那是什么原因?我试过谷歌搜索它,但所有的命中都是呼救,以解决问题 - 这意味着它是一个相当广泛的需求,并没有很好理解.