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
LONG and LONG RAW You use the LONG datatype to store the variable-length character strings. The LONG datatype is such as the VARCHAR2 datatype, except that the maximum length o

set serveroutput on declare a number(5); b number(5); c number(5); begin a:=&a; b:=&b; c:=a/b; dbms_output.put_line(c); exception when zero_divide then d

What are the rates for help in writing PL/SQL procedures and functions?

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

Usefulness of Data Type In SQL, as in most computer languages, a type can be used for constraining the values that are permitted to be used for some purpose. In particular, i

which operation is used if we are interested in only certain columns of a table?

Data Types in SQL - Character CHARACTER or, synonymously, CHAR, for character strings. When this type is to be the declared type of something (e.g., a column), the permissible

The Package Specification The package specifications contain the public declarations. The scopes of these declarations are local to your database representation and global to t

PRIMARY KEY: PRIMARY KEY  indicates that the table is subject to a key constraint, in this case declaring that no two rows in the table assigned to ENROLMENT can ever have the

set serveroutput on declare a number(5); b number(5); c number(5); begin a:=&a; b:=&b; c:=a/b; dbms_output.put_line(c); exception when zero_d