Search
 
SCRIPT & CODE EXAMPLE
 

SQL

oracle columns in all_tables

-- Depending on connected user grants:
SELECT * FROM USER_TAB_COLS WHERE TABLE_NAME = 'my_table';	-- User tables
SELECT * FROM ALL_TAB_COLS WHERE TABLE_NAME = 'my_table';	-- Available to user
SELECT * FROM DBA_TAB_COLS WHERE TABLE_NAME = 'my_table';	-- All schemas

-- Columns from all tables in a schema (adapt with USER_..., DBA_... or ALL_...):
SELECT c.TABLE_NAME, c.DATA_TYPE FROM ALL_TAB_COLS c
JOIN ALL_TABLES t ON t.OWNER = c.OWNER
WHERE OWNER = 'my_schema';
Comment

PREVIOUS NEXT
Code Example
Sql :: get tables in database sql 
Sql :: oracle create table comment 
Sql :: create database if not exists 
Sql :: stpop start psql server 
Sql :: mysql get column names from table 
Sql :: mysql get date diff in months 
Sql :: how to restart mysql in linux 
Sql :: find largest table in mysql database 
Sql :: oracle columns table 
Sql :: oracle to_timestamp 
Sql :: liquibase alter column type / length 
Sql :: postgresql add not null constraint 
Sql :: flutter sqlite auto incrementing id primary key 
Sql :: run postgres with docker 
Sql :: mysql interval 1 day 
Sql :: select records for day before yesterday mysql 
Sql :: sql error 1175 
Sql :: mssql show database size 
Sql :: restart mysql server ubuntu 
Sql :: status mysql 
Sql :: athena drop partition 
Sql :: mysql loop insert 
Sql :: copy column data to another column sql with creating slugs 
Sql :: add constraint fk 
Sql :: postgres delete last row 
Sql :: sqlite show columns in table 
Sql :: psql is not recognized 
Sql :: convert float to int sql 
Sql :: mysql date format unix timestamp 
Sql :: rename table in mysql 
ADD CONTENT
Topic
Content
Source link
Name
9+5 =