- PostgreSQL 教程
- PostgreSQL - 首頁
- PostgreSQL - 概述
- PostgreSQL - 環境設定
- PostgreSQL - 語法
- PostgreSQL - 資料型別
- PostgreSQL - 建立資料庫
- PostgreSQL - 選擇資料庫
- PostgreSQL - 刪除資料庫
- PostgreSQL - 建立表
- PostgreSQL - 刪除表
- PostgreSQL - 模式
- PostgreSQL - 插入查詢
- PostgreSQL - 選擇查詢
- PostgreSQL - 運算子
- PostgreSQL - 表示式
- PostgreSQL - WHERE 子句
- PostgreSQL - AND & OR 子句
- PostgreSQL - 更新查詢
- PostgreSQL - 刪除查詢
- PostgreSQL - LIKE 子句
- PostgreSQL - LIMIT 子句
- PostgreSQL - ORDER BY 子句
- PostgreSQL - GROUP BY
- PostgreSQL - WITH 子句
- PostgreSQL - HAVING 子句
- PostgreSQL - DISTINCT 關鍵字
- 高階 PostgreSQL
- PostgreSQL - 約束
- PostgreSQL - 連線
- PostgreSQL - UNION 子句
- PostgreSQL - NULL 值
- PostgreSQL - 別名語法
- PostgreSQL - 觸發器
- PostgreSQL - 索引
- PostgreSQL - ALTER TABLE 命令
- TRUNCATE TABLE 命令
- PostgreSQL - 檢視
- PostgreSQL - 事務
- PostgreSQL - 鎖
- PostgreSQL - 子查詢
- PostgreSQL - 自動遞增
- PostgreSQL - 許可權
- 日期/時間函式 & 運算子
- PostgreSQL - 函式
- PostgreSQL - 有用函式
- PostgreSQL 介面
- PostgreSQL - C/C++
- PostgreSQL - Java
- PostgreSQL - PHP
- PostgreSQL - Perl
- PostgreSQL - Python
- PostgreSQL 有用資源
- PostgreSQL - 快速指南
- PostgreSQL - 有用資源
- PostgreSQL - 討論
PostgreSQL - 算術運算子
以下是一些展示 PostgreSQL 算術運算子用法的簡單示例:
testdb=# select 2+3;
?column?
----------
5
(1 row)
testdb=# select 2*3;
?column?
----------
6
(1 row)
testdb=# select 10/5;
?column?
----------
2
(1 row)
testdb=# select 12%5;
?column?
----------
2
(1 row)
testdb=# select 2^3;
?column?
----------
8
(1 row)
testdb=# select |/ 25.0;
?column?
----------
5
(1 row)
testdb=# select ||/ 27.0;
?column?
----------
3
(1 row)
testdb=# select 5 !;
?column?
----------
120
(1 row)
testdb=# select !!5;
?column?
----------
120
(1 row)
postgresql_operators.htm
廣告