Description
This week’s lab gets you started, connected, and uses your first commands while learning the
interface for SQL Developer and a few string formatting techniques.
Getting Started
Your submission will be a single text-based SQL file with the solutions provided.
Create a new Worksheet in SQL Developer. Save the file as L01_ID_LASTNAME.sql
Your submission needs to be commented and include the question, the solutions, and the
results. Please note the results should be commented lines (so the file still runs as submitted)
Tasks
Hopefully, you downloaded demobld11 file and ran the script that will build the tables as
outlined in the Week 0 document.
• Start by entering in the SQL Developer worksheet:
• SELECT * FROM EMPLOYEES;
• SELECT * FROM DEPARTMENTS;
• SELECT * FROM JOB_HISTORY;
• Which one of these tables appeared to be the widest? or longest? (Answer in
commented text)
• If the following SELECT statement does NOT execute successfully, how would you fix
it?
(Answer in commented text)
SELECT last_name “LName”, job_id “Job Title”,
Hire Date “Job Start”
FROM employees;
• There are THREE coding errors in this statement. Can you identify them?
(Answer in commented text) Then, correct them and provide a working statement.
SELECT employee_id, last name, commission_pct Emp Comm,
FROM employees;
• What command would show the structure of the LOCATIONS table?
(Answer in commented text)
Create a query to display the output shown below.
Example Submission
— ***********************
— Name: Your Name
— ID: #########
— Date: The current date
— Purpose: Lab 1 DBS301
— ***********************
— Question 1 – write a brief note about what the
question is asking
— Q1 Solution —
SELECT * FROM TABLE;
— Q2 Solution —