Last active
July 30, 2019 12:24
-
-
Save Lkledu/8912ffa00d3c75a934e9e1887d167f65 to your computer and use it in GitHub Desktop.
select all columns minus one <POSTGRESQL>
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//select all columns from table minus one column; | |
//work like describe | |
//use this to create function to select all columns with values from table, minus one column | |
//like this: (select *-'column_name' from table_name) | |
select TABLE_NAME, COLUMN_NAME from information_schema.columns where TABLE_NAME = 'table_name' AND COLUMN_NAME != 'column_name'; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment