Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Create constraint to enforce proper email domain

1030605Aug 4 2013 — edited Aug 4 2013

Hi,

I'm new to SQL, but am trying to help a friend build a database for his company he is trying to start (think of a mechanic and his home garage).

I'm using Oracle 11g Express. Per the the below code, how do I build a check constraint that enforces that the value for 'Email' must be using the domain of his company? E.G.- *@billsgarage.com

Thanks for your help!

CREATE TABLE EMPLOYEE

(EmpNo NUMBER(6) PRIMARY KEY,

Title VARCHAR2(30) NOT NULL,

Fname VARCHAR2(10) NOT NULL,

Lname VARCHAR2(10) NOT NULL,

Phone VARCHAR2(12) NOT NULL,

Email VARCHAR2(40),

HireDate DATE DEFAULT GETDATE(),

This post has been answered by Frank Kulash on Aug 4 2013
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Sep 1 2013
Added on Aug 4 2013
3 comments
1,994 views