SQLite的:选择*但表ID [英] Sqlite: SELECT * BUT id FROM Table
本文介绍了SQLite的:选择*但表ID的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我在一个表中有许多列,并且想要SELECT * FROM Table
,但其中一列(例如:位置)除外,而不必列出我要使用的所有列.
I have many columns in a table and wanted to SELECT * FROM Table
except for one column (ex: location) without having to list all the columns I want to use.
SELECT * EXCEPT id FROM Table
???
推荐答案
当然可以.
但是这里有一个解决方法.创建表的VIEW
,例如
But here's a workaround. Create a VIEW
of the table, eg
CREATE VIEW ViewName
AS
SELECT col1, col2, col3, .... -- don't select the column name you want to hide
FROM tableName;
一旦创建了VIEW
,您现在就可以调用它,
once the VIEW
was created, you can now call it,
SELECT * FROM ViewName
这篇关于SQLite的:选择*但表ID的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文