0

If I'm creating a table such as this:

CREATE TABLE a(
firstName CHAR(30) NOT NULL,
phone char(20) CHECK(phone RLIKE'(?:+)?[0-9()- ]+')
);

If I insert something like this:

INSERT INTO a VALUES('joe', 'mmmm');

It is allowed. How do I make it throw an error if the phone does not match the regex?

Chrispresso
  • 3,660
  • 2
  • 19
  • 31

0 Answers0