The Database Knowledgebase on the Web

KNOWLEDGEBASE:

SQL

Oracle

MySQL

Postgres 

General topics 

Glossary 

SQL

Data Types

String

The Boolean data type stores TRUE or FALSE. Internally, it may store them as a 1 and 0 but when displaying them and referring to them, you interact with the TRUE and FALSE. Boolean is a conditional data type. If statements resolve to a boolean value and boolean values can be used in if statements.

Var1 CHAR(1) := 'A';

Var2 CHAR(1) := 'B';

Var3 BOOLEAN := TRUE;


If (var1 <> var2)

Equals True


If (var3)

Equals True


Some databases, Oracle most notably, do not support SQL booleans.

Topic: String Number Date Boolean

Topics:

Contact: Lewis Cunningham
lewisc@databasewisdom.com

About us

Contact us

Support us

Search Database Wisdom