SQL Statements

In this assignment, you are to write Oracle SQL statements to:

  • Create a table.
  • Accept user input to populate the table.
  • Check if the data has been added to the table properly.

Use the following as references for your assignment.

  • Date, Time Exercise (with answers)
    Help with writing SQL commands to format date and time.
  • Text Processing Exercise (with answers)
    Help with formatting the output and allowing users to communicate with the database.
  • Sequence Exercise (with answers)
    Help with writing SQL statements to create sequence and alias.

 

This assignment consists of three parts:

  • Write Oracle SQL statements to create a table called Employee with the following attributes and associated data types.

Employee

EmployeeIDCHAR(9)LNameCHAR(15)FNameCHAR(15)PhoneNoCHAR(10)

  • Write Oracle SQL statements to insert new records to the Employee table. The program should do the following:

— Trident Bookstore —
Please enter the Employee ID: Jimmy2345
Please enter employee First Name: Jimmy
Please enter employee Last Name: William
Please enter the phone number of the employee: 714-456-3456
Note: Add at least 2 records of the data

  • Check whether data has been loaded to the table properly.

Oracle live SQL does not support some of the commands such as ACCEPT. It is helpful to learn these commands though.

Assignment Expectations

  • Copy the Oracle SQL commands to a Word document, and turn it in to the dropbox. Please note that there is no need to turn in the output of the commands, since you would most likely get a “Commands not supported” error message because of reserved words ACCEPT in your SQL.
  • Apply what you have learned in this module to accomplish all three parts of the assignment.
Tags: No tags