Hour 5, "Manipulating Data"

Quiz Answers

1: Use the EMPLOYEE_TBL with the following structure:
COLUMNDATA TYPE(NOT)NULL
LAST_NAMEVARCHAR2(20)NOT NULL
FIRST_NAMEVARCHAR2(20)NOT NULL
SSNCHAR(9)NOT NULL
PHONENUMBERNULL
LAST_NAMEFIRST_NAMESSNPHONE
SMITHJOHN3124567883174549923
ROBERTSLISA2321188573175452321
SMITHSUE4432219893178398712
PIERCEBILLY310239856317676390

What would happen if the following statements were run:

  1. insert into employee_tbl
    ('JACKSON', 'STEVE', '313546078', '3178523443');
    										
  2. insert into employee_tbl values
    ('JACKSON', 'STEVE', '313546078', '3178523443');
    										
  3. insert into employee_tbl values
    ('MILLER', 'DANIEL', '230980012', NULL);
    										
  4. insert into employee_tbl values
    ('TAYLOR', NULL, '445761212', '3179221331');
    										
  5. delete from employee_tbl;
    										
  6.  delete ...

Get Sams Teach Yourself SQL in 24 Hours, Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.