-
BOOLEAN column in DB2
How can I define a Boolean or Yes/No column when creating a DB2 table ? Please
help.
-
Re: BOOLEAN column in DB2
"Faraw" <betemariam@hotmail.com> wrote:
>
>How can I define a Boolean or Yes/No column when creating a DB2 table ?
Please
>help.
GOOD question!
Actually you cannot have boolean in sql-92.
Use char(1) with constraint on the value or a check.
Example:
create table demotbl1
(boolcolumn1 char(1)
...
check (boolcolumn1 in ('Y', 'N'))
)
There are good books on SQL and BD2
(1) Understanding the new SQL: a complete guide by J. Milton
a must for SQL but not easy reading
(2) Books by CJ Date like A guide to the SQL standard.
very informative
(3) Books on DB2 by IBM.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
Forum Rules
|
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL
|
Bookmarks