10) Advanced Data Definition Commands
10) Advanced Data Definition Commands
• ADD
• MODIFY
• DROP
• Some RDBMSs (such as Oracle) do not permit changes to data types unless column to be
changed is empty
Adding a Column
Dropping a Column
• When table is copied, integrity rules do not copy, so primary and foreign keys need to be
manually defined on new table
– Syntax:
•
Deleting a Table from the Database
• DROP
– Syntax:
– Count
– Calculate averages
• SQL allows user to limit queries to only those entries having no duplicates or entries whose
duplicates may be grouped
– Can contain columns, computed columns, aliases, and aggregate functions from one or
more tables