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.
无论如何要做一个 mysql select * 并告诉查询 - 你不想要的字段,还是你必须手动将它们全部输入,除了你不想要的字段?
绝对没有。
但这里有一个解决方法。创建一个VIEW表,例如
VIEW
CREATE VIEW ViewName AS SELECT col1, col2, col3, .... -- hide password here FROM tableName;
一旦VIEW创建,您现在可以调用它,
SELECT * FROM ViewName