Count operator in sql, PL-SQL Programming

Count Operator in SQL

Example: Counting the students who have scored more than 50 in some exam

(SELECT COUNT (*) FROM

(SELECT DISTINCT StudentId

FROM EXAM_MARK

WHERE Mark > 50) AS T)

Example is a direct translation of the corresponding example in the theory book but it can be abbreviated-and is much more likely to be written-as

(SELECT COUNT (DISTINCT StudentId )

FROM EXAM_MARK

WHERE Mark > 50)

Posted Date: 1/18/2013 6:04:40 AM | Location : United States







Related Discussions:- Count operator in sql, Assignment Help, Ask Question on Count operator in sql, Get Answer, Expert's Help, Count operator in sql Discussions

Write discussion on Count operator in sql
Your posts are moderated
Related Questions
Opening a Cursor Variable The OPEN-FOR statement relates a cursor variable with the multi-row query, executes the query, and then identifies the result set. The syntax for ope

Cursor Variables Similar to a cursor, cursor variable points to the current row in the result set of a multi-row query. But, dissimilar a cursor, a cursor variable can be opene

Initializing Objects: Till you initialize an object by calling the constructor for its object type, the object is automatically null. That is, the object itself is null, not me

UTL_FILE: The Package UTL_FILE permits your PL/SQL programs to read & write operating system (OS) text files. It gives a restricted version of the standard OS stream file I/O,

IF Statement The IF statement executes a series of statement conditionally. Whether the series is executed or not depends on the value of the Boolean expression. Syntax:

heap sort program in pl/sql

Use of Table Comparisons - SQL Table comparisons where it is noted that although table expressions cannot be compared, we have TABLE (t) to convert a table expression t into

BEGIN Parameter Description in pl sql: BEGIN: This keyword signals the beginning of the executable section of a PL/SQL block, that contains executable statements. The execut

#quesWrite a cursor to open an employee database and fetch the employee record whose age is greater than 45.tion..

Updating by replacement Syntax: UPDATE ENROLMENT SET Name = 'Ann' WHERE StudentId = SID ('S1'); Note the use of SET, as already noted in connection with direct a