second step at defining type sid in sql create


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

Request for Solution File

Ask an Expert for Answer!!
PL-SQL Programming: second step at defining type sid in sql create
Reference No:- TGS0180815

Expected delivery within 24 Hours