Search
 
SCRIPT & CODE EXAMPLE
 

SQL

find a column in all tables postgres

select t.table_schema,
       t.table_name
from information_schema.tables t
inner join information_schema.columns c on c.table_name = t.table_name 
                                and c.table_schema = t.table_schema
where c.column_name = 'last_name'
      and t.table_schema not in ('information_schema', 'pg_catalog')
      and t.table_type = 'BASE TABLE'
order by t.table_schema;
Code has been copied
Comment

search for tables with name postgresql

select table_schema,
       table_name
from information_schema.tables
where table_name like 'payment%'
      and table_schema not in ('information_schema', 'pg_catalog')
      and table_type = 'BASE TABLE'
order by table_name,
         table_schema;
Code has been copied
Comment

PREVIOUS NEXT
Code Example
Sql :: mysql list users on ubuntu 
Sql :: postgres alter table add primary key 
Sql :: start mysql server 
Sql :: best configuration for display table in sqlplus 
Sql :: mysql your password does not satisfy the current policy requirements 
Sql :: convert sqlite table to pandas dataframe 
Sql :: find last instance of character in string mysql 
Sql :: Check Table Exists 
Sql :: oracle truncate partition 
Sql :: grant schema permissions postgres 
Sql :: import database in phpmyadmin command line 
Sql :: cannot pip install mysqlclient 
Sql :: mysql select greater than yesterday 
Sql :: how to add auto increment primary key 
Sql :: delete a view sql 
Sql :: oracle detect invalid password 
Sql :: check database size sql 
Sql :: sql throw error 
Sql :: check sql database table lock 
Sql :: vagrant mysql downgrade version 
Sql :: sql query to copy data from one column to another 
Sql :: Aqua Data studio postgresql ssl 
Sql :: get a list of table names and field names from SQL 
Sql :: Are NULL values in a database the same as that of blank space or zero? 
Sql :: get parameter value in mysql trigger 
Sql :: create database store 
Sql :: base nosql 
Sql :: Sql creating roles 
Sql :: sql today at midnight 
Sql :: go install mysql 
ADD CONTENT
Topic
Content
Source link
Name
4+8 =