Skip to content

Commit 2ba10ba

Browse files
authored
Create boolean.sql
1 parent c503899 commit 2ba10ba

File tree

1 file changed

+23
-0
lines changed
  • data-platform/core-converged-db/database-23c/23c-basic-examples

1 file changed

+23
-0
lines changed
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
REM Script in 23c: boolean.sql
2+
3+
drop table test_boolean;
4+
5+
create table TEST_BOOLEAN
6+
( name VARCHAR2(100),
7+
IS_SLEEPING BOOLEAN);
8+
9+
alter table TEST_BOOLEAN modify (IS_SLEEPING boolean NOT NULL);
10+
11+
alter table TEST_BOOLEAN modify (IS_SLEEPING default FALSE);
12+
13+
insert into TEST_BOOLEAN (name) values ('Mick');
14+
insert into TEST_BOOLEAN (name, is_sleeping) values ('Keith','NO');
15+
insert into TEST_BOOLEAN (name, is_sleeping) values ('Ron',1);
16+
17+
18+
select name from test_boolean where not is_sleeping;
19+
20+
col name format a25
21+
select * from test_boolean;
22+
23+
select dump(is_sleeping) from test_boolean where name = 'Ron';​

0 commit comments

Comments
 (0)