
- PostgreSQL Tutorial
- PostgreSQL - Home
- PostgreSQL - Overview
- PostgreSQL - Environment Setup
- PostgreSQL - Syntax
- PostgreSQL - Data Types
- PostgreSQL - Create Database
- PostgreSQL - Select Database
- PostgreSQL - Drop Database
- PostgreSQL - Create Table
- PostgreSQL - Drop Table
- PostgreSQL - Schema
- PostgreSQL - Insert Query
- PostgreSQL - Select Query
- PostgreSQL - Operators
- PostgreSQL - Expressions
- PostgreSQL - Where Clause
- PostgreSQL - AND & OR Clauses
- PostgreSQL - Update Query
- PostgreSQL - Delete Query
- PostgreSQL - Like Clause
- PostgreSQL - Limit Clause
- PostgreSQL - Order By Clause
- PostgreSQL - Group By
- PostgreSQL - With Clause
- PostgreSQL - Having Clause
- PostgreSQL - Distinct Keyword
- Advanced PostgreSQL
- PostgreSQL - Constraints
- PostgreSQL - Joins
- PostgreSQL - Unions Clause
- PostgreSQL - NULL Values
- PostgreSQL - Alias Syntax
- PostgreSQL - Triggers
- PostgreSQL - Indexes
- PostgreSQL - Alter Table Command
- Truncate Table Command
- PostgreSQL - Views
- PostgreSQL - Transactions
- PostgreSQL - Locks
- PostgreSQL - Sub Queries
- PostgreSQL - Auto Increment
- PostgreSQL - Privileges
- Date/Time Functions & Operators
- PostgreSQL - Functions
- PostgreSQL - Useful Functions
- PostgreSQL Interfaces
- PostgreSQL - C/C++
- PostgreSQL - Java
- PostgreSQL - PHP
- PostgreSQL - Perl
- PostgreSQL - Python
- PostgreSQL Useful Resources
- PostgreSQL - Quick Guide
- PostgreSQL - Useful Resources
- PostgreSQL - Discussion
PostgreSQL - Arithmetic Operators
Here are simple examples showing usage of PostgreSQL Arithmetic Operators −
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
Advertisements