SELECT 'SELECT ' || array_to_string(ARRAY( SELECT 'o' || '.' || c.column_name FROM information_schema.columns As c WHERE Table_name = 'name of the table AND Arthur c. olumn_name NOT IN (' exclude field', 'exclude field')), ', ') | | 'FROM table name As o' As SQLSTMTCopy the code

Reference: blog.csdn.net/u011944141/…