Usefulness of data type, PL-SQL Programming

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, it can be used for constraining:

  1. The values that can be assigned to a variable
  2. The values that can be substituted for a parameter
  3. The values that an operator can yield when invoked
  4. The values that can appear in a given column of a table

In each of the above cases, the type used for the purpose in question is the declared type of the variable, parameter, operator, or column, respectively. As a consequence, every expression denoting a value has a declared type too, whether that expression be a literal, a reference to a variable, parameter, or column, or an invocation of an operator. Thus SQL is able to detect errors at "compile time"- by mere inspection of a given script - that would otherwise arise, and cause much more inconvenience, at run time (when the script is executed).

Posted Date: 1/18/2013 2:12:14 AM | Location : United States







Related Discussions:- Usefulness of data type, Assignment Help, Ask Question on Usefulness of data type, Get Answer, Expert's Help, Usefulness of data type Discussions

Write discussion on Usefulness of data type
Your posts are moderated
Related Questions
Comparison Operators Usually, you use the comparison operators in the WHERE clause of a data manipulation statement to form the predicates, that compare one expression to anot

IN OUT Mode An IN OUT parameter passes initial values to the subprogram being called and return efficient values to the caller. Within the subprogram, an IN OUT parameter acts

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

OPEN-FOR Statement The OPEN-FOR statements execute the multi-row query related with a cursor variable. It also allocates the resources used by the Oracle to process the query a

Using PRIOR and NEXT The PRIOR(n) returns the index number that precede index n in a collection. The NEXT(n) returns the index number which succeed the index n. If n has no pr

EXIT The EXIT statement forces a loop to done unconditionally. Whenever an EXIT statement is encountered, the loop is done immediately and controls the passes to the next statem

to write a heap sort program usin pl-sql

Defining and Declaring Collections To create the collections, you must define a collection type, and then declare the collections of that type. You can define the VARRAY types a

Parameter and Keyword Description: type_name: This identifies a user-defined type specifier that is used in the subsequent declarations of the objects. AUTHID Clause:

Parameter Default Values As the illustration below shows, you can initialize the IN parameters to the default values. In that way, you can pass various numbers of actual par