Example of except operator - sql, PL-SQL Programming

Example of EXCEPT Operator - SQL

Example, like its counterpart in the theory book, illustrates the convenience of allowing any table expression to be the source for an INSERT. It assumes that all the exam scripts submitted by students have been marked and it has been decided to record marks of zero for students who failed to turn up for an exam they should have sat. (Remember that SQL's EXCEPT requires its operands to be of the same degree, unlike NOT MATCHING-hence the third element, 0, of the second operand in the example.)

Example: Awarding zero marks to students who failed to take the exam

INSERT INTO EXAM_MARK

SELECT StudentId, CourseId, 0

FROM IS_ENROLLED_ON

EXCEPT

SELECT StudentId, CourseId, 0

FROM EXAM_MARK;

Posted Date: 1/18/2013 11:37:41 PM | Location : United States







Related Discussions:- Example of except operator - sql, Assignment Help, Ask Question on Example of except operator - sql, Get Answer, Expert's Help, Example of except operator - sql Discussions

Write discussion on Example of except operator - sql
Your posts are moderated
Related Questions
Parameter and Keyword Description: EXIT: An unconditional EXIT statement (i.e., one without a WHEN clause) exits the present loop instantly. The Execution resumes with th

WHEN or THEN Key Constraints Suppose a table has two columns representing a period of time throughout which the information conveyed by the other columns is recorded as having

ALTER TABLE bb_basketitem ADD CONSTRAINT bitems_qty_ck CHECK (quantity BEGIN INSERT INTO bb_basketitem VALUES (88,8,10.8,21,16,2,3); END; Brewbean’s wants to add a check

Using raise_application_error The Package DBMS_STANDARD that is supplied with Oracle gives language facilities that help your application to interact with Oracle. For illustra

Avoiding Collection Exceptions   In many cases, if you reference a nonexistent collection element, then PL/SQL raises a predefined exception. Consider the illustration shown b

Description: Demonstrate your knowledge of PL/SQL programming by writing and thoroughly testing triggers and stored procedures associated with an e-commerce application that pr

Object Types An object type is a user-defined complex datatype which encapsulates the data structure along with the functions and procedures required to manipulate the data. Th

Declaring Exceptions The Exceptions can be declared only in the declarative part of the PL/SQL subprogram, block, or package. By introducing its name, you can declare an excep

Understanding Varrays The Items of type VARRAY are termed as the varrays. They permit you to relate a single identifier with the whole collection. This relationship lets you man

Opening a Cursor Opening the cursor executes the query & identifies the result set that consists of all rows that meet the query search criteria. For the cursors declared usin