Hour 24, "Extensions to Standard SQL"

Quiz Answers

1: Is SQL a procedural or non-procedural language?
A1: SQL is non-procedural, meaning that the database decides how to execute the SQL statement. The extensions discussed during this hour were procedural.
2: What are some of the reasons differences in SQL exist?
A2: Differences exist in SQL among the vendors because of storage requirements, advantages over competitors, ease of use, and performance considerations.
3: What are the three basic operations of a cursor, outside of declaring the cursor?
A3: OPEN, FETCH, and CLOSE.
4: Procedural or non-procedural: With which does the database engine decide how to evaluate and execute SQL statements?
A4: Non-procedural.

Exercise Answers

1: Try some research about the SQL variations among the various vendors. Go to a library or bookstore and look for vendor-specific books on SQL. Compare various SQL statements, such as Data Manipulation Language (DML). Compare the INSERTs, DELETEs, and UPDATEs for the differences. You might also look for an ANSI SQL book in which to make comparisons.
A1: No specific answer.
2: Using the EMPLOYEE_TBL (see Appendix D, "CREATE TABLE Statements for Book Examples"), write the interactive SQL statement that returns the name of all employees who have a ZIP code of 46234.
A2:
SELECT LAST_NAME, FIRST_NAME
FROM EMPLOYEE_TBL
WHERE ZIP = '&ZIP';

Enter value for zip: 46234
old   3: WHERE ZIP = '&ZIP'
new   3: WHERE ZIP = '46234'

Results of Query


LAST_NAM FIRST_NA
————
————
SPURGEON TIFFANY

1 row selected.
									

3. Be sure to mention your knowledge of SQL in your resume, or in an interview. Knowledge of SQL is usually a plus for many IT positions today. Also, try to practice as much as possible, consistently, to extend your knowledge of SQL and relational databases.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset