Day 2

Quiz

1: Do the following statements return the same or different output:
SELECT * FROM CHECKS;
select * from checks;
A1: The only difference between the two statements is that one statement is in lowercase and the other uppercase. Case sensitivity is not normally a factor in the syntax of SQL. However, be aware of capitalization when dealing with data.
2: None of the following queries work. Why not?
  1. Select *

  2. Select * from checks

  3. Select amount name payee FROM checks;

A2:
  1. Select *

    The FROM clause is missing. The two mandatory components of a SELECT statement are the SELECT and FROM.

  2. Select * from checks

    The semicolon, which identifies the end of a SQL statement, is missing.

  3. Select amount name payee FROM checks;

    You need a comma between each column ...

Get Sams Teach Yourself SQL in 21 Days, Fourth 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.