mirror of
https://github.com/chaisql/chai.git
synced 2025-10-05 15:46:55 +08:00
34 lines
302 B
SQL
34 lines
302 B
SQL
-- test: typeof
|
|
! typeof()
|
|
|
|
! typeof(a)
|
|
'no table specified'
|
|
|
|
> typeof(1)
|
|
'integer'
|
|
|
|
> typeof(1 + 1)
|
|
'integer'
|
|
|
|
> typeof(2.0)
|
|
'double'
|
|
|
|
> typeof(2.0)
|
|
'double'
|
|
|
|
> typeof(true)
|
|
'boolean'
|
|
|
|
> typeof('hello')
|
|
'text'
|
|
|
|
> typeof('\xAA')
|
|
'bytea'
|
|
|
|
> typeof(NULL)
|
|
'null'
|
|
|
|
-- test: now
|
|
> typeof(now())
|
|
'timestamp'
|