Commit baa103fa authored by michael lundquist's avatar michael lundquist
Browse files

Adding week3 hw

parent 24011613
/*
problem1
Create a new table using the CREATE TABLE command. Use your first name
and your last name for the name of the table
(for instance, for John Smith the name of the table will be JOHN_SMITH).
Make sure to include at least four different data types
(CHAR, VARCHAR2, NUMBER, DATE) for the columns and appropriate
constraints (PK, NOT NULL, CHECK, UNIQUE). Use the DESCRIBE command
to verify that the columns have been defined correctly.
*/
/*
problem2
Use the INSERT command to insert a new record into the table created in
Problem 1. When inserting a record, provide values for all columns.
Use the default format for the date. Use the
SELECT * FROM your_table_name;
command to display the content of the table
(make sure to substitute your_table_name with the actual name of your
table).
*/
/*
problem3
Use the INSERT command to insert a new record into the table created in
Problem 1. When inserting a record, provide values for selected columns
only. Use the default format for the date. Use the
SELECT * FROM your_table_name;
command to display the content of the table
(make sure to substitute your_table_name with the actual name of your table).
*/
/*
problem4
Use the UPDATE command to update multiple values in the table created in
Problem 1. Use the
SELECT * FROM your_table_name;
command to display the content of the table
(make sure to substitute your_table_name with the actual name of your
table).
*/
/*
problem5
Use the DELETE command to delete one specific row from the table created
in Problem 1. Use the
SELECT * FROM your_table_name;
command to display the content of the table
(make sure to substitute your_table_name with the actual name of your
table).
*/
/*
problem6
Use the COMMIT statement to save changes in the table created in
Problem 1. Use the SELECT * FROM your_table_name; command to display the
content of the table (make sure to substitute your_table_name with the
actual name of your table).
*/
/*
problem7
Use the ROLLBACK command to undo changes in the table created in Problem 1.
What happened? Why? Use the
SELECT * FROM your_table_name;
command to display the content of the table
(make sure to substitute your_table_name with the actual name of your
table).
*/
/*
problem8
Use the DROP TABLE command to drop the table created in Problem 1.
*/
\ No newline at end of file
/*
problem1
Write an SQL query to retrieve records from one of the tables in the
JustLee Books database. In a search condition, include one or more
arithmetic comparison operators (=, !=, >, <, >=, etc.).
*/
/*
problem2
Write an SQL query to retrieve records from one of the tables in the
JustLee Books database. In a search condition, include the BETWEEN … AND
operator.
*/
/*
problem3
Write an SQL query to retrieve records from one of the tables in the
JustLee Books database. In a search condition, include the IN operator.
*/
/*
problem4
Write an SQL query to retrieve records from one of the tables in the
JustLee Books database. In a search condition, include the LIKE operator
with either % or _ (or both).
*/
/*
problem5
Write an SQL query to retrieve records from one of the tables in the
JustLee Books database. In a search condition, include the IS NULL
operator.
*/
/*
problem6
Write an SQL query to retrieve records from one of the tables in the
JustLee Books database. In a search condition, include multiple conditions
using logical operators (AND and OR).
*/
/*
problem7
Write a complex SQL query to retrieve records from one of the tables
in the JustLee Books database. In a search condition, use logical
operators to join multiple conditions that include at least one of the
arithmetic operators and one of the special operators. Use the
ORDER BY statement to order the output.
*/
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment