Sign up now to view this solution! It's quick, easy, and secure to subscribe. We will return you to this solution, unlocked, when you’re done.
Hi,
I'm having problems with trying to constrain my SQL create table statement. I need to restrict a name to only having alphabetic characters. I have found out that isalphabetic returns 1 if true and 0 if false.
I have broken my create table statement down to the very basics, so I can figure out the problem. At the moment it is:
create table person(
name VARCHAR(20) NOT NULL
check(isalphabetic(name) = 1),
primary key(name)
);
This will not compile however. When I tried it in Oracle SQL*Plus (8i) it returned "invalid relational operator".
I'm assuming that the 'isalphabetic' function is not supported in Oracle 8i. I also know that square brackets are not supported, which eliminates the use of [a-zA-Z] as a check option.
Do ou have any ideas how I could enforce this restriction?
Thanks!
Sign up now to view this solution! It's quick, easy, and secure to subscribe. We will return you to this solution, unlocked, when you’re done.
New Carrier-Grade Blade and Rackmount Servers Deliver Better Performance, Density and Power Efficiency for the Communications Industry ...
Oracle is fixing 21 flaws in its Java SE and Java for Business products in its February critical patch update issued this week ...
Why was he there? Who wasn’t invited and why? What did they talk about? Why was he really there? These are the questions being debated ...
"The Oracle gurus provide answers, solutions and valuable workarounds"
User: schwertner
"Wow! Excellent, valuable explanation. Hats off to you"
User: aseshu70
"Solution worked fantastic and performs excellent! Thanks heaps"
User: klausbrandlhuber
slightwv
2,000
0 points yesterday
Profile
Posted on 2003-05-21 at 20:38:02ID: 28239298
All comments and solutions are available to Premium Service Members only. Sign up to view the solution to this question. Already a member? Log in to view this solution.