那麼請檢查查詢SQL查詢錯誤(雖然怪異查詢)
這裏表名是web18sso_login_a所以
select table_name from information_schema.tables where table_name like '%eb18ssoa%'
回報web18ssoa
用戶ID是該表中的列
現在我想從查詢中獲得用戶ID的數據
select userid from (
SELECT * from (
select * from (
select table_name from information_schema.tables where table_name='web18ssoa'
) As bbc
) As ccv
) as nnn
上面的查詢表示從字段列表中無效的用戶ID
我知道我可以直接使用用戶ID選擇從web18ssoa;
,但我想通過上面的查詢做的是有沒有調用實際的表從一個表名獲取列數據的任何其它方式
請幫我
你有什麼理由需要這種可怕的構造嗎? –
是的,它是我的項目的一部分,我正在做 – SubhashDasyam