Presentation is loading. Please wait.

Presentation is loading. Please wait.

Oracle : SQL.

Similar presentations


Presentation on theme: "Oracle : SQL."— Presentation transcript:

1 Oracle : SQL

2

3

4 ALTER TABLE tablename ADD (column name datatype [DEFAULT expression],
e.g. ALTER TABLE copy_f_staffs ADD (hire_date DATE DEFAULT SYSDATE) MODIFY (column name datatype [DEFAULT expression], column name datatype, ... MODIFY (hire_date DATE) DROP COLUMN column name; DROP COLUMN manager_target;

5 DROP UNUSED (manager_budget)
ALTER TABLE tablename DROP COLUMN column name; e.g. ALTER TABLE copy_f_staffs DROP COLUMN manager_target; SET UNUSED (column name); SET UNUSED (manager_budget); DROP UNUSED COLUMNS; DROP UNUSED (manager_budget)

6 RENAME old_name to new_name;
DROP TABLE tablename; e.g. DROP TABLE copy_f_staffs; RENAME old_name to new_name; e.g. RENAME copy_f_staffs to copy_fastfood_staffs; TRUNCATE TABLE tablename: COMMENT ON TABLE tablename | COLUMN table.column IS 'place your comment here'; e.g. COMMENT ON TABLE employees IS 'the employee table if for the Western Region only'; If you want to drop a comment previously made on a table or column, use the empty string ( ' ' ); IS ' ' ;


Download ppt "Oracle : SQL."

Similar presentations


Ads by Google