Second step at defining type sid in sql, PL-SQL Programming

Second Step at defining type SID in SQL

CREATE TYPE SID AS VARCHAR(5) ;

Explanation:

  1. TYPE SID announces that a type named SID is being defined to the system.
  2. AS VARCHAR(5) defines SID as a distinct type, whose values are represented by values of type VARCHAR(5). In this form of type definition the given representation must be a system- defined type.

Under this definition, SID('S1') is exactly equivalent to the same expression in Tutorial D, and the SQL expression CAST(s AS VARCHAR(5)), where s is a value of type SID, is equivalent to Tutorial D's THE_C(s). However, we have no way of further constraining the string values representing student identifiers; so SID('34x.1'), for example, also denotes a value of type SID, as does SID(' ').

Posted Date: 1/18/2013 2:39:32 AM | Location : United States







Related Discussions:- Second step at defining type sid in sql, Assignment Help, Ask Question on Second step at defining type sid in sql, Get Answer, Expert's Help, Second step at defining type sid in sql Discussions

Write discussion on Second step at defining type sid in sql
Your posts are moderated
Related Questions
Hi,am developing a library system and relating all the table is somehow complex,could you kindly assist me

Fetching Across Commits The FOR UPDATE clauses acquire exclusive all row locks. All rows are locked when you open the cursor, and when you commit your transaction they are unl

Relational Operators and Logical Operators It prepares the ground for subsequent sections in which each specific relational operator is paired with its logical counterpart, su

Benefit of the dynamic SQL: This part shows you how to take full benefit of the dynamic SQL and how to keep away from some of the common pitfalls. Passing the Names of Sc

Using DEFAULT You can use the keyword DEFAULT rather than that of the assignment operator to initialize the variables. For e.g. the declaration blood_type CHAR := ’O’; it can b

Using EXISTS The EXISTS(n) returns TRUE if the nth element in a collection exist. Or else, EXISTS(n) returns FALSE. Primarily, you use EXISTS with DELETE to maintain the spars

CHECK Constraints in SQL A CHECK constraint is a table constraint defined using the key word CHECK, as already illustrated in several examples in this chapter. In particular,

THEORY OF BIOGENESIS - This theory explains that the existing living organisms originated from pre-existing living beings not from non living entities. This concept of or

At times, customers make mistakes in submitting their orders and call to cancel the order. Brewbean's wants to create a trigger that automatically updates the stock level of all pr

Introduction Oracle 9i - it was made public in the year 2001 with over 400 features, and graphics, it has merged the traditional business with modern internet application