在SQLite中使用子查询而不是表名

时间:2017-01-26 11:15:07

标签: sql sqlite

而不是:

 select * from Clients;

我在尝试:

select * from (select tableName from CSTable where uid=1);

它不起作用。有什么建议吗?。

仅供记录

sqlite> .schema CSTable
CREATE TABLE CSTable (
    uid integer NOT NULL CONSTRAINT CSTable_pk PRIMARY KEY,
    tableName text NOT NULL,
);

CSTable的内容:

select * from CSTable;
uid         tableName      
----------  -------------  
1           Clients

0 个答案:

没有答案