Solved

Boolean Field

Posted on 2000-02-22
3
1,476 Views
Last Modified: 2008-03-17
How can I set the value of a boolean field in an sql query?
0
Comment
Question by:Aikema
3 Comments
 
LVL 1

Author Comment

by:Aikema
ID: 2549240
ie. in my query am i supposed to feed it a 0 or 1 or should i use true or false instead.
0
 
LVL 7

Accepted Solution

by:
spiridonov earned 20 total points
ID: 2549308
You should use 0/1. Note, that this field can't be null.
0
 
LVL 142

Expert Comment

by:Guy Hengel [angelIII / a3]
ID: 2610013
Note that a variable of type bit can be NULL
0

Featured Post

Backup Your Microsoft Windows Server®

Backup all your Microsoft Windows Server – on-premises, in remote locations, in private and hybrid clouds. Your entire Windows Server will be backed up in one easy step with patented, block-level disk imaging. We achieve RTOs (recovery time objectives) as low as 15 seconds.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Having an SQL database can be a big investment for a small company. Hardware, setup and of course, the price of software all add up to a big bill that some companies may not be able to absorb.  Luckily, there is a free version SQL Express, but does …
Ever wondered why sometimes your SQL Server is slow or unresponsive with connections spiking up but by the time you go in, all is well? The following article will show you how to install and configure a SQL job that will send you email alerts includ…
Using examples as well as descriptions, and references to Books Online, show the documentation available for datatypes, explain the available data types and show how data can be passed into and out of variables.
Viewers will learn how to use the INSERT statement to insert data into their tables. It will also introduce the NULL statement, to show them what happens when no value is giving for any given column.

863 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now