Skip to content

Commit 1480ba9

Browse files
authored
Create 2-domains-in-tables.sql
1 parent 49e984f commit 1480ba9

File tree

1 file changed

+29
-0
lines changed

1 file changed

+29
-0
lines changed
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
REM Script for 23c: 2-domains-in-tables.sql
2+
3+
-- optional drop the table person
4+
drop table if exists person;
5+
6+
-- create table person with domain myemail_domain
7+
create table person
8+
( p_id number(5),
9+
p_name varchar2(50),
10+
p_sal number,
11+
p_email varchar2(100) domain myemail_domain
12+
)
13+
annotations (display 'person_table');
14+
15+
-- add some rows
16+
insert into person values (1,'Bold',3000,null);
17+
insert into person values (1,'Schulte',1000, '[email protected]');
18+
insert into person values (1,'Walter',1000,'twalter@t_online.de');
19+
insert into person values (1,'Schwinn',1000, '[email protected]');
20+
insert into person values (1,'King',1000, '[email protected]');
21+
commit;
22+
23+
-- try to add invalid data
24+
insert into person values (1,'Schulte',3000, 'mschulte%gmx.net');
25+
26+
-- query the table person
27+
desc person
28+
29+
select * from person;

0 commit comments

Comments
 (0)