RelationalDBDesign
SiteMap
Database Analysis
Database Design
Extended DB Features
Oracle SQL Extensions
SQL Extensions
«Prev
Next»
SQL Extensions
Pet Store Schema
Database Components
Oracle DB Structure
Data Dictionary Views
SQL Plus DB Logging
Oracle SQL is Different
Database SW Conclusion
Oracle Extensions - Quiz
Select Statement
Query Operators Conditions
Hierarchical Retrieval Connect
Union Intersect Minus
SQL Group Operator
Advanced Group Operators
Oracle Pseudo Columns
Oracle Extension Conclusion
Data Manipulation
Character String Functions
Concat Length Instr
Oracle Substr
Upper initcap rtrim
to_char, round, trunc
Standard Date Format
Valid Time Related Functions
Decode NVL Functions
Function Extension Implementations
Join Table Queries
In Clause Special Extensions
Outer Join Syntax
Inner Join Outer Join-Quiz
Correlated Sub Queries
Subquery with Exists
From Clause Query
Advanced Queries Conclusion
SQL Plus Environment
Using Environment
SQL Plus Query
SQL Plus Text Editor
Working Query Files
SQL*Plus File location
Setting Column Attributes
Settings for Reports
Saving Output with Spool
SQL Plus environment
Creating Table Structures
Create Table Command
Tablespaces Data Ciles
Setting Storage Space
Primary Key Unique Constraints
Check Unique Constraints
Adding Modifying Column
Disable Constraint Commands
Table Constraints
Adding or Modifying Column - Exercise
Course project: Adding and modifying columns
Objective
Add a column and change another column in an existing table.
Exercise scoring
This auto-scored exercise is worth 20 points. When you have completed the simulation, click the
Submit
button to receive full credit and to review the exercise solution.
Instructions
In the following simulation exercise, you will be asked to perform a task or set of tasks you have learned in the previous lesson. You will be working with the course project, a pet store called House-O-Pets. The instructions will tell you what you need to do at each step but will not tell you exactly how.
There is a correct way to proceed through each screen of the simulation by typing the code in the field requested. If at any point you find that you cannot proceed, go back and re-read the lesson and then navigate through the simulation again.
This shows you the columns in the EMPLOYEE table as it is now. Your first task is to add a new column at the end of the table. The column is named BIRTH_DATE. It can be null and has no constraints. Type in the command and execute it by pressing ENTER.
Syntax error
ALTER TABLE EMPLOYEE ADD (BIRTH_DATE DATE);
Finish the statement with a semi-colon so it executes immediately.
Change the LASTNAME column to have a default value of 'LASTNAMEHERE'. Type in the command on two lines (refer to the sample syntax in the lesson) and execute it by pressing ENTER.
ALTER TABLE EMPLOYEE
End the first line with the word EMPLOYEE. Finish the statement with a semicolon so it executes immediately.
MODIFY (LASTNAME DEFAULT 'LASTNAMEHERE');
End the first line with the word EMPLOYEE. Finish the statement with a semicolon so it executes immediately.
Submit