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
(a) What are decision support systems, and what role do they play in the business environment? (b) Data warehousing is defined as "a subject-oriented, integrated, non-volatile c

CURRVAL and NEXTVAL The series is a schema object which generates the sequential numbers. Whenever you form a sequence, you can specify its primary value and an increment. T

DELETE Command - SQL Loosely speaking, DELETE removes some existing rows from its target table. Suppose the university decides that course C3 is to be withdrawn. Example shows

a. Create a table odetails_new. It has all the attributes of odetails and an additional column called cost, whose values are the product of the quantity and price of the part bein

Records Records are the items of the type RECORD. The Records have exclusively named fields that can store the data values of various types. And hence, a record treat associate

Question 1. Update stock levels when the order is cancelled At times, customers make mistakes in submitting their orders and call to cancel the order. Brewbean’s wants to create a

Biconditional - SQL The biconditional p ↔ q can be expressed in Tutorial D by p = q and the same is true of SQL. The question then arises as to whether, in SQL, p = q is equiv

COMMIT Statement The COMMIT statement explicitly makes everlasting changes to the database during the present transaction. The Changes made to the database are not considered e

Data Types in SQL - Timestamp TIMESTAMP for values representing points in time on a specified uniform scale. DATE is used for timestamps on a scale of one day, such as DATE '2

How Exceptions Are Raised By the run-time system, the internal exceptions are raised implicitly as are user-defined exceptions that you have related with an Oracle error number