Max and min operator in sql, PL-SQL Programming

MAX and MIN operator in SQL

Example:

(SELECT MAX (Mark) FROM EXAM_MARK WHERE StudentId = 'S1')

(SELECT MIN (Mark) FROM EXAM_MARK WHERE StudentId = 'S1')

Example needs no further explanation. SQL also has AVG for averages. Its counterparts aggregate AND and OR are spelled, respectively, EVERY and either SOME or ANY, but all of these must be used with care because of the consequences of the aforementioned general rule concerning the treatment of NULL. For example, if the condition c evaluates to UNKNOWN for every row of table t, or t is empty, then (SELECT EVERY(c) FROM t) evaluates to UNKNOWN, whereas when t is empty it really ought to evaluate to TRUE.

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







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

Write discussion on Max and min operator in sql
Your posts are moderated
Related Questions
Truth Tables: However in propositional logic - here we are restricted to expressing sentences and where the propositions are true or false - so we can check where a particular

Keyword & Parameter Description: WHEN: This keyword introduces the exception handler. You can have many exceptions execute the similar sequence of the statements by follo

Using the BULK COLLECT Clause The keywords BULK COLLECT specify the SQL engine to bulk-bind output collections before returning them to the PL/SQL engine. You can use these ke

Recursion versus Iteration Dissimilar the iteration, recursion is not crucial to PL/SQL programming. Any problem which can be solved using recursion can be solving using the it

Running the PL/SQL Wrapper To run the PL/SQL Wrapper, go through the wrap command at your operating system prompt by using the syntax as shown: wrap iname=input_file [oname=

Packaging Cursors   You can split a cursor specification from its body for placement in a package. In that way, you can change the cursor body without changing the cursor spec

Selecting Objects: Suppose that you have run the SQL*Plus script below that creates object type Person and object table persons, and that you have settled the table: CREATE

Creating and Destroying Base Tables: Example shows an SQL command to create the base table counterpart of the ENROLMENT variable Example  Creating a base table. CREATE T

PL SQL Code Review HEADER ELEMENTS File Name Clear, meaningful and descriptive about main objective of the file. Multiple words are joined using underscores which adh

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