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
Primary Key - SQL A PRIMARY KEY specification carries an implicit NOT NULL constraint on each column of the specified key. When more than one key constraint is required, the k

Parameter and Keyword Description: collection_name: This keyword identifies the index-by table, nested table, or varray formerly declared within the present scope. cu

I want someone to write a TSQL function that returns the name of the ODBC DSN. I will use the queries below, to get information about the connection, but none of these return th

Cursor Attributes   The Cursors and cursor variables have 4 attributes which give you helpful information about the execution of a data manipulation statement. Syntax:

Using DELETE This process has three forms. The DELETE removes all elements from the collection. DELETE(n) removes the nth element from the nested table. When n is null, then D

Data Types in SQL - Interval, Boolean INTERVAL for values denoting, not intervals (!) but durations in time, such as 5 years, 3 days, 2 minutes, and so on. BOOLEAN, con

Using TRIM This process has two forms. The TRIM removes an element from the end of the collection. The TRIM(n) removes the n elements from the end of the collection. For e.g.

EXIT Statement   You can use the EXIT statement to exit a loop. The EXIT statement has 2 forms: the conditional EXIT WHEN and the unconditional EXIT. With the either form, you

Interesting properties of CROSS JOIN - SQL Compare these with the "interesting properties of JOIN", CROSS JOIN is associative but not commutative. Unlike JOIN and NATURAL JOI

Need Database Development with Analysis Tools Project Description: I want a database for large governmental and private data sets on one country that can be simply extended t