How often do we have to write an insert with explicit column list: May be because the source we are inserting from do not have all the columns. Or the destination table has that dreaded long column that you have to exclude. Keep below SQL handy (Oracle database 11g onwards only). To quickly get a comma seperated list of columns for a table. SELECT LISTAGG(column_name , ',') WITHIN GROUP (ORDER BY column_id ) column_list FROM all_Tab_columns where table_name = upper(:TABLE_NAME) and owner = upper(:OWNER) GROUP BY table_name;
QueryLight is a lightweight Oracle database client.
Please help us in betterment of the software by donating generously. Your encouragement and funds will keep the site going.
Donate Here on Paypal.