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
Use Native Dynamic SQL A few programs (a normal-purpose report writer for illustration) should build and process a variety of SQL statements at run time. Therefore, their full

I want to implement heap sort algorithm in pl sql please share the source code for guidance

The accuracy of product table data is critical and the Brwebean's. owner wants to have an audit file that contains information regarding all DML activity on the BB_PRODUCT table. T

Project Description: I have two types of data sources. One that is a list in SharePoint and another that is an access desktop database. The access desktop database is fairly com

Second Step at defining type SID in SQL CREATE TYPE SID AS VARCHAR(5) ; Explanation: TYPE SID announces that a type named SID is being defined to the system.

Cursor FOR Loops In most cases that need an explicit cursor, you can simplify the coding by using a cursor FOR loop rather of the OPEN, FETCH, and CLOSE statements. A cursor FO

DBMS_OUTPUT: The Package DBMS_OUTPUT enables you to display output from the PL/SQL subprograms and blocks, that makes it easier to test and debug them. The procedure put_ line

1. a. Write a trigger that fires when a part's price is updated. The trigger will write a record into a table called PriceUpdates. The record should contain the information of

Using a join on 2 tables, select all columns and 10 rows from the 2 tables without the use of a Cartesian product. Query: SELECT * FROM EMPLOYEE1 E JOIN STAFF S ON E.EMP_

Information Hiding   With the information hiding, you see only the details that are significant at a given level of algorithm and data structure design. The Information hiding