SQL Tests


Great test of SQL queries.

http://www.northern.ac.uk/ncmaterials/computing%20science/db-design/quiz/10_sql/sql.htm
http://www.docnmail.com/learn/SQL.htm
http://www.w3schools.com/quiztest/quiztest.asp?qtest=SQL
http://www.sqlquiz.com/sql-quiz.php

Affordable Certifications
Get ONLINE CERTIFICATION for $9.95.
http://www.expertrating.com/certifications/sql-test.asp

$75
http://www.w3schools.com
===========================================================

Example of RIGHT JOIN (numbers 19 & 20)

Which of the following statements will
(using the Micrsoft Access SQL implementation) list all cars together
with all car owners and order the output by the owner name. Take care NOT to list any cars that do not have identified owners.

Assume that the table STUDREC is placed to the LEFT of the table CARS in the Access query design window.

Note: SREF is the key field in STUDREC (the student reference number) and OID is the "foreign key" in CARS - OID stands for Owners IDentification.

SELECT studrec.init, studrec.sname, cars.regno, cars.colour, cars.model
FROM studrec RIGHT JOIN cars ON studrec.sref = cars.oid
WHERE NOT cars.oid IS NULL
ORDER BY studrec.sname, studrec.init;





 

What did you think of this article?




Trackbacks
  • No trackbacks exist for this post.
Comments

Leave a comment

Submitted comments are subject to moderation before being displayed.

 Name (required)

 Email (will not be published) (required)

Your comment is 0 characters limited to 3000 characters.