[SQL] Table Manipulate 常用指令
:thumbsup: PostgreSQL Tutorial
Data Types
在 PostgreSQL 中提供了下面這幾種資料型態:
- Boolean: 在宣告時可以使用
boolean
或bool
- Character:
char
- Number
- Temporal (date and time-related data types)
- Special Types
- Array
Boolean
keywords: boolean
, bool
- 在宣告時可以使用
boolean
或bool
作為關鍵字都可 - 在 PostgreSQL 中會自動把
1
,yes
,y
,t
轉換成true
;而0
,no
,n
,false
則轉換為false
。 - 當從 Boolean 欄位中選出資料來呈現時,PostgreSQL 會以
t
和f
來呈現,空格則顯示為NULL
。