I know this kinda late maybe, but just thought maybe it helps others by adding this comment:
In Oracle you can set up a check constraint to sort of emulate the boolean idea e.g.
CREATE TABLE table_name
(
column_name CHAR CHECK (column_name IN ('Y','N'))
);
or you can add a check constraint to an existing table e.g.
ALTER TABLE table_name ADD CONSTRAINT test_bool CHECK
(
column_name IN('Y','N')
);
This of course depends on the column type you did setup in the table.
for the rest, there is a specific BOOLEAN type in PL/SQL when you declare you variable e.g.
DECLARE
variable_name BOOLEAN DEFAULT [FALSE/TRUE];
BEGIN
...
END;
/
Cheers
René
|