Question: This lab covers CRUD (select, insert, update & delete), joins, alter table, foreign keys, indexes and SQL dumps. For statement syntax, use Google to find
This lab covers CRUD (select, insert, update & delete), joins, alter table, foreign keys, indexes and SQL dumps. For statement syntax, use Google to find examples.
1. Create a new user (as yourself or favorite movie character) by inserting into the users table. As the userId is a varchar, choose a random, but unique value (Like abc123). Be sure to populate ALL columns except the createdDate column. Paste the SQL statement below.
2. Write a SQL statement to return the new user (all columns) by filtering on the username. To filter with a select statement, use a where clause. Paste the SQL statement & results below. Remember, pasting the results is 50% of the credit.
3. Write SQL to create 2 emails and 2 phone numbers for the new user. This requires 4 insert statements, 2 inserts into the userEmail table and 2 into the userPhone table. Use the same userId as the user created in question 1. Paste the SQL below.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
