We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d7f5424 commit 49e984fCopy full SHA for 49e984f
data-platform/core-converged-db/database-23c/sql-domains/1-creating-domain.sql
@@ -0,0 +1,12 @@
1
+REM Script for 23c: 1-creating-domain.sql
2
+
3
+-- optional drop the domain.
4
+-- Using FORCE in contrast to PRESERVE disassociates the domain from all its dependent columns
5
+drop domain myemail_domain;
6
7
+--create a domain to describe an email
8
9
+create domain if not exists myemail_domain AS VARCHAR2(100)
10
+default on null 'XXXX' || '@missingmail.com'
11
+constraint email_c CHECK (regexp_like (myemail_domain, '^(\S+)\@(\S+)\.(\S+)$'))
12
+display substr(myemail_domain, instr(myemail_domain, '@') + 1);
0 commit comments