Loading Consent Dialog
RelationalDBDesign
SiteMap
Database Analysis
Database Design
Extended DB Features
Oracle SQL Extensions
SQL Extensions
«Prev
Next»
SQL Extensions
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
Intersect Union Minus
SQL Group Operator
Advanced Group Operators
Oracle Pseudo Columns
Oracle Extension Conclusion
Data Manipulation
Character String Functions
Concat Substr Length
instr Function Syntax
Upper initcap rtrim
to_char, round, trunc
round, trunc Functions
Standard Date Format
Oracle Date Format
Valid Time Related Functions
Functions return Values
Date Comparison
Decode NVL Functions
Summarize using decode
Function Extension Implementations
Join Table Queries
Inner Join Outer Join-Quiz
Advanced Queries Conclusion
SQL Plus Environment
Sql Plus TextEditor
SQL Plus File Location Saved
SQL Plus Worksheet
Creating Table Structures
Setting Storage Space
Primary Key Unique 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