usefulness of data type in sql as in most


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).

Request for Solution File

Ask an Expert for Answer!!
PL-SQL Programming: usefulness of data type in sql as in most
Reference No:- TGS0180807

Expected delivery within 24 Hours