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

Third Step at defining type SID in SQL






  1. DOMAIN SID announces that a domain named SID is being defined to the system.
  2. AS VARCHAR(5) specifies that values in domain SID are certain values of type VARCHAR(5).
  3. CHECK ( ... ) specifies a constraint defining exactly which values of type VARCHAR(5) are in the domain SID. Note that the key word VALUE, which is available only in domain constraints, refers (in this particular example) to an arbitrary value of type VARCHAR(5).
  4. VALUE IS NOT NULL specifies that the null value of type VARCHAR(5) is not a value in the domain. This is needed because the other conjuncts evaluate to UNKNOWN if VALUE is the null value and a domain constraint is deemed to be violated only when it evaluates to FALSE.
  5. SUBSTRING(VALUE FROM 1 FOR 1) = 'S' specifies that every value in the domain must begin with S. Note SQL's deliberate use of "noise" words in the invocation of SUBSTRING, the justification for which is to distinguish invocations of system-defined operators from those of user-defined ones.
  6. CAST('+'||SUBSTRING(VALUE FROM 2) AS INTEGER) >= 0 is an attempt to emulate an invocation of IS_DIGITS, perhaps showing how a user-defined operator of that name might be implemented in SQL. The character "+" is concatenated to the putatively numeric portion of the string in order to exclude values such as 'S+123' from the domain (the string '+123' can be cast as an integer but '++123' cannot).
Posted Date: 1/18/2013 2:40:21 AM | Location : United States

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

Write discussion on Third step at defining type sid in sql
Your posts are moderated
Related Questions
LOOP Statements The LOOP statements execute a series of statements at multiple times. The loops enclose the series of statements that is to be repeated. The PL/SQL provides typ

UNION and OR - SQL SQL supports UNION explicitly but differently from the way it supports JOIN explicitly. As we have seen, JOIN is used exclusively within the FROM clause, su

Structure of an Object Type: Similar to package, an object type has 2 parts: the specification and the body. The specification is the interface to your applications; it declar

Parameter Modes: You do not require to specify a parameter mode for the input bind arguments (those used, for illustration, in the WHERE clause) as the mode defaults to IN. Th

Use the RETURNING Clause Frequently, the application requires information about the row affected by a SQL operation, for illustration, to produce a report or take a subsequent

Demonstrate your knowledge of PL/SQL programming by writing and thoroughly testing triggers and stored procedures associated with an e-commerce application that provides security l

Project Description: We organize an online system called ACPAS we have created a project called EVO that can be use by our customers to integrate their web sites with the Acpas

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

I would like to have a custom MS Access database designed and coded that would help me schedule my customer's orders and that would help me track my employees production output and

Entering and Exiting If you enter the executable part of an autonomous routine, the major transaction suspends. When you exit the routine, the major transaction resumes. To ex