Books and articles about SQL Rambler's Top100 Ñìåíèòü ÿçûê íà: Ðóññêèé 29 March 2024 09:49:05


www.sql-ex.ru
Skip Navigation Links  

 

Print  Print version

Main page

Typical errors at solution of exercises. Exercise 55

S. Moiseenko

For each class, define the year in which the first ship of this class was launched.
Result set : class , year.

There should be used NULL-value, if launching year for ships of present class is unknown, because the task says: “for each class”. However, the distinctive mistake in solving this task doesn't lie in this. The question is that there may be a class in the database, but not any ships of this class. It completely satisfies the constraints of “Ships” scheme, namely, “one-to-many” relationship between the tables “Classes” and “Ships”. Naturally, in this case NULL-value in launching year should be written, as we don't know it.

Given examples here can be done directly on the website by selecting the check box “Without checking” on the page with SELECT exercises.

Main page

Print  Print version


Usage of any materials of this site is possible
only under condition of mandatory allocation of the direct link to a site
http://www.sqlbooks.ru
on each page where used materials are placed.

 Main   Articles    Books 
Ðåéòèíã@Mail.ru Rambler's Top100 Alt Óïðàæíåíèÿ ïî SQL: îáó÷åíèå, òåñòèðîâàíèå, ñåðòèôèêàöèÿ ïî ÿçûêó SQL Copyright c 2002-2006. All rights reserved.