nntp2http.com
Posting
Suche
Optionen
Hilfe & Kontakt

Boolean-Abfrage standardkonform?

Von: Karsten Wutzke (kwutzke@web.de) [Profil]
Datum: 15.07.2009 16:39
Message-ID: <60971a99-318e-494d-bf2c-0abd3574f175@24g2000yqm.googlegroups.com>
Newsgroup: de.comp.datenbanken.misc
Hallo,

ich habe eine simple Testtabelle

CREATE TABLE testbool
(
id INTEGER PRIMARY KEY AUTO_INCREMENT,
is_whatever BOOLEAN
);

mit 5 Einträgen ala INSERT INTO testbool (id, is_whatever) VALUES
(NULL, x) mit x = TRUE | FALSE:

1 	1
2 	0
3 	0
4 	1
5 	0

Folgendes Statement geht:

SELECT *
FROM testbool
WHERE is_whatever;

Ist letzteres, also nur 'WHERE is_whatever' statt 'WHERE is_whatever =
TRUE' SQL-standardkonform?

Karsten

[ Auf dieses Posting antworten ]

Antworten