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
FORALL Statement The FORALL statements instruct the PL/SQL engine to bulk-bind the input collections before sending them to the SQL engine. Though the FORALL statement consists

Declaring Cursor Variables Once a REF CURSOR type is define by you, and then you can declare the cursor variables of that type in any PL/SQL block or subprogram. In the exampl

EXCEPTION_INIT Pragma The pragma EXCEPTION_INIT relates an exception name with an Oracle error number. Which allow you to refer to any internal exception by the name and to wri

I have a Pascal Source file that needs to be compiled into a Service. In addition, there are various functions (Pascal Procedures I guess) that need to be created to Read and Write

Using SET TRANSACTION You use the SET TRANSACTION statement to begin the read-only or read-write transaction, start an isolation level, or assign your present transaction to a

Subprograms The PL/SQL has two types of subprograms known as the procedures and functions that can take parameters and be invoked. As the following example represents, a subp

Committing and Rolling Back The COMMIT and ROLLBACK end the active autonomous transaction but do not exit the autonomous routine. As the figure shows, if one transaction ends,

Relational Operators The relational operators permit you to compare randomly complex expressions. The list below provides the meaning of each operator:

Consider the following set of database tables (same tables from Assignment 6-1). Please take note of foreign keys (most of them carry the same names as the corresponding primary ke

I need SQL , WP SQL Expert Project Description: Expert required to modify WP SQL query. Skills required are MySQL, SQL, PHP, Wordpress