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 ! ^^

Recommended Answers

All 2 Replies

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

Please read more here and here .

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

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.