Jump to content

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


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 post
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 post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...