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 The Comparison operators can compare one expression to another. The outcome is always true, false, or null. Usually, you use a comparison operators in condi


Effects of NULL in Table Literal When a VALUES expression appears as the source value for an SQL INSERT statement, the key word NULL can appear as a field value, such that for

Recursive Subprograms The recursive subprogram is the one that calls itself. Think of a recursive call as a call to a few other subprograms that does the similar task as your

Sequential Control Dissimilar to the IF and LOOP statements, the GOTO and NULL statements are not important to the PL/SQL programming. The configuration of PL/SQL is such that th

Positional Notation The first procedure call uses the positional notation. The PL/SQL compiler relates the first actual parameter, account, with the first proper parameter, ac

Use of Table Expressions - Expressing Constraint Conditions With the exception of key constraints, the examples in the theory book all explicitly reference at least one relvar

Example of Shorthand for a row constraint Example: Shorthand for a row constraint ALTER TABLE EXAM_MARK ADD CONSTRAINT Mark_in_range CHECK (Mark BETWEEN 0 AND 100);

What Are Subprograms? The Subprograms are named PL/SQL blocks which can take parameters and be invoked. The PL/SQL has 2 types of subprograms known as the procedure s and func

Parameter SELF in pl/sql The MEMBER methods recognize a built-in parameter named SELF that is an instance of the object type. Whether declared explicitly or implicitly, it is