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
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_

Passing Cursor Parameters You use the OPEN statement to pass the parameters to a cursor. Unless you want to accept the default values, each proper parameter in the cursor decl

Hi there, I have the final part of a submission to do, it is a demonstration that takes place tomorrow. I do not have to use previous information, but i have resources that sho

Parameter and Keyword Description: select_item: This select_item is a value returned by the SELECT statement, and then assigned to the equivalent variable or field in the

%NOTFOUND The %NOTFOUND is logical, opposite of the %FOUND. The %NOTFOUND yields FALSE if the last fetch returned a row, or TRUE when the final fetch failed to return a row. I

Boolean Values Only the values TRUE, FALSE, & NULL can be assigned to a Boolean variable. For illustration, given the declaration DECLARE done BOOLEAN; the following statements

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

Create the four tables and populate them with the given data. Answer the following queries in SQL. 1. Get all part-color/part-city combinations. Note: Here and subsequently, the

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

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