Skip to content

Instantly share code, notes, and snippets.

@seanbehan
Created May 10, 2016 15:03
Show Gist options
  • Save seanbehan/146d74f580f1790aefbc00fb1c713ead to your computer and use it in GitHub Desktop.
Save seanbehan/146d74f580f1790aefbc00fb1c713ead to your computer and use it in GitHub Desktop.
find columns where the data is of float and non float type in postgres
-- grab columns where the value is float type
select * from table_name where column_name ~ E'^[0-9\.]+\$';
-- grab columns where the value is not float type
select * from table_name where column_name !~ E'^[0-9\.]+\$';
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment