Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Database > Oracle
Password Reminder
Register
| FAQ | Members List | Search | Today's Posts | Mark Forums Read
Oracle General Oracle database discussions.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Oracle section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
 
 
Thread Tools Search this Thread Display Modes
  #11 (permalink)  
Old November 20th, 2003, 04:32 PM
Registered User
 
Join Date: Nov 2003
Location: , , .
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default

thanks!! that helps greatly!

I guess I should have read my oracle documentation.

But your examples helped me to really understand what was going on.

Thanks again!

  #12 (permalink)  
Old January 15th, 2004, 08:17 AM
Registered User
 
Join Date: Jan 2004
Location: Baku, , Azerbaijan.
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via ICQ to AzOraDBA Send a message via MSN to AzOraDBA Send a message via Yahoo to AzOraDBA
Default

Quote:
quote:Originally posted by sal
 Oracle 9i has a boolean data type. You can set it to TRUE FALSE or NULL.
Oracle 8i does not have Boolean.

Sal
But when i was using a wizard for creating table there wasn`t any boolen type for data. Where i can find it...
Thanx

  #13 (permalink)  
Old June 8th, 2006, 06:35 AM
Registered User
 
Join Date: Jun 2006
Location: , , .
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Oracle allows Boolean data type in PL/SQL. But it can not be used as a data type for a column.
  #14 (permalink)  
Old March 1st, 2007, 08:24 PM
Registered User
 
Join Date: Feb 2007
Location: , Sydney, Australia.
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default

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é
 


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Oracle to SQL Server DataType Mapping maulik33 SQL Language 0 November 1st, 2007 02:48 PM
help me with boolean array Un33k Pro Visual Basic 2005 1 June 12th, 2007 11:43 AM
boolean starlightt Java Basics 2 April 6th, 2006 05:34 PM
Oracle Boolean Datatype Fireball Oracle 1 April 26th, 2004 05:46 PM



All times are GMT -4. The time now is 06:19 AM.


Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.