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.
这是我的声明:
SHOW FULL COLUMNS IN tbl_name WHERE NOT ( FIELD = 'col1' OR FIELD = 'col2' )
我想将它减少到这样的东西,以便 PHP 代码更高效:
SHOW FULL COLUMNS IN tbl_name WHERE NOT ( FIELD = 'col1','col2' )
select COLUMN_NAME from INFORMATION_SCHEMA.COLUMNS where TABLE_NAME = 'tbl_name' and COLUMN_NAME not in ('col1', 'col2')