The difference between true and 'true' : Boolean « Data Type « PostgreSQL






The difference between true and 'true'

postgres=#
postgres=# -- The difference between true and 'true'
postgres=#
postgres=# SELECT true AS boolean_t,
postgres-#      'true' AS string_t,
postgres-#       false AS boolean_f,
postgres-#      'false' AS string_f;
 boolean_t | string_t | boolean_f | string_f
-----------+----------+-----------+----------
 t         | true     | f         | false
(1 row)

postgres=#

           
       








Related examples in the same category

1.Using the boolean type
2.Checking Boolean values: yes
3.Implying Boolean 'true'
4.Checking for 'false' Boolean values
5.NOT for boolean value
6.Compare the value of a boolean field against any of the values
7.boolean value 't'
8.NULL will not register as either true or false