-
Python script to setup new SQL file
for i in range (1,17): print("/* "+str(i)+"\n\n*/\n\n")
-
SQL command to list all tables in Oracle
SELECT table_name FROM user_tables;
-
Drop all tables in Oracle DB (scheme)
copy and paste the outputSELECT 'DROP TABLE "' || TABLE_NAME || '" CASCADE CONSTRAINTS;' FROM user_tables;
-
Comments in SQL
-- single line commment /* multi line comment */
-
Display names of all constraints for a table in Oracle SQL
SELECT * FROM user_constraints WHERE table_name = '<your table name>' AND constraint_name = '<your constraint name>';
-
Never put
AS
inFROM
clause in Oracle SQL -
EXCEPT
clause doesn't work, instead useMINUS
instead -
use
ROLLBACK TO <savpoint name>
to go to a savepoint
NOTE: savepoints are created for the current session only -
UNIQUE
doesn't work in Oracle SQL so usecount(*)
method like in book
This repository has been archived by the owner on Sep 9, 2024. It is now read-only.