0

Hey all !
I want to create a new data-type called 'Phone' so that I can use it when create a new Attribute, with its form is : xxx-xxx-xxxx
For example : 123-543-8978
And when users want to UPDATE my table, they must enter a string with the same form ...
I 've just see the necessary statements on http://msdn.microsoft.com/en-us/library/ms175007.aspx . I tried to do as the direction, here 's the code :

creat type PHONE as table
(
    head CHAR(3),
    mid1 CHAR,
    mid2 CHAR(3),
    tail CHAR(4)
)
go;

But it doesn 't work .
So ... Can any one please give me a solution ? Or at least a tip ?
Thank U so much ! ^^

2
Contributors
2
Replies
3
Views
7 Years
Discussion Span
Last Post by Obelisk4
0

You will always get errors, if you try T-SQL syntax in oracle.

Please read more here and here .

Thank you, debasisdas ! I got a great help, especially on the second site that U gave me ^^

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.