-
-
Save 544/917956 to your computer and use it in GitHub Desktop.
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
-- Show all tables | |
> SELECT TABLE_NAME FROM TABS | |
-- List fields from a table | |
> SELECT * | |
FROM user_tab_cols | |
WHERE table_name = 'table_name' | |
-- List some fields fields from a table | |
> SELECT column_name, data_type, FROM user_tab_cols WHERE table_name = 'table_name' | |
-- Alter table | |
ALTER TABLE table MODIFY ( field type ) | |
select R_CONSTRAINT_NAME from user_constraints where | |
Constraint_name = 'W1244_T0238_FK'; | |
select table_name, COLUMN_NAME | |
from user_cons_columns where | |
CONSTRAINT_NAME = 'Obtained from above' | |
select table_name, COLUMN_NAME | |
from user_cons_columns where | |
CONSTRAINT_NAME ='W1244_T0238_FK'; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment