Jump to content

Create A Table with Certain condition like email '@' phone starts with '0'


zille
 Share

Recommended Posts

Dear All,

I need to create a table with field condition like phone number must start with '0' and email address must have the letter '@'. I am new so can anyone tell me how.

So ###### I am stuck in email and phone as don`t know how to proceed. Condition are:

 

Phone Number must start with 0

Email should have @ string

 

My code:

create table if not exists CUSTOMER(    Cust_firstame varchar2(40) not null,    Cust_sirname varchar2(40) not null,    Cust_house number not null default '0',    Cust_addr varchar2(100),    Cust_town varchar2(100),    Cust_town varchar2(100),    Cust_state varchar2(100),    Cust_pcode varchar2(8) not null,    Cust_phone varchar2(14),    Cust_email varchar2(30),

Anyone can help.

Also is it possible to add comment like Cust_house showing comment "House Number"

 

Thank you

Link to comment
Share on other sites

create table if not exists CUSTOMER(    Cust_firstame varchar2(40) not null,    Cust_sirname varchar2(40) not null,    Cust_house number not null default '0',    Cust_addr varchar2(100),    Cust_town varchar2(100),    Cust_town varchar2(100),    Cust_state varchar2(100),    Cust_pcode varchar2(8) not null,    Cust_phone varchar2(14) check begin with '0',    Cust_email varchar2(30) check '@',

This does not work.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...