Mega Code Archive
Search
.Net
ASP .Net
ASP .Net Tutorial
C#
C# Book
C# by API
C# Tutorial
VB.Net
VB.Net by API
VB.Net Tutorial
Visual C++ .Net
VisualBasic Script
Java
Java
Java Book
Java by API
Java Tutorial
Script
Flash ActionScript
Flex
JavaScript DHTML
JavaScript Reference
JavaScript Tutorial
Database
MSSQL
MSSQL Tutorial
MySQL
MySQL Tutorial
Oracle PLSQL
Oracle PLSQL Tutorial
PostgreSQL
Languages
Android
C
C Tutorial
C++
C++ Tutorial
Delphi
Perl
PHP
Python
Python Tutorial
Ruby
Silverlight
Office
MSOfficeExcel 2007 Tutorial
MSOfficePowerPoint 2007 Tutorial
MSOfficeWord 2007 Tutorial
Data
XML
XML Tutorial
PostgreSQL
Math Functions 56 codes
Home
PostgreSQL
Math Functions
1 Abs(x)
2 Abs(x) absolute value
3 Asin(x)
4 Atan(x)
5 Atan2(1, 0), atan2(-1, 0), atan2(0, 0)
6 Atan2(x, y)
7 Calculates the MD5 hash of string, returning the result in hexadecimal
8 CAST(2 AS double precision) ^ CAST(3 AS double precision)
9 Cbrt(dp) cube root
10 Cbrt(x)
11 Ceil(1 1), ceil(1 5)
12 Ceil(dp or numeric) smallest integer not less than argument
13 Ceil(x)
14 Ceiling(dp or numeric) smallest integer not less than argument (alias for ceil)
15 Cos(x)
16 Cot(x)
17 Degrees(dp) radians to degrees
18 Degrees(r)
19 Exp(dp or numeric) exponential
20 Exp(x)
21 Floor(dp or numeric) largest integer not greater than argument
22 Floor(x)
23 Get random number
24 Isfinite(now
25 Ln(dp or numeric) natural logarithm
26 Ln(exp(10 0))
27 Ln(x)
28 Log(10, 12 0) AS log_12, log(3, 12 0) AS log 12, base 3
29 Log(b numeric, x numeric) logarithm to base b
30 Log(b, x)
31 Log(dp or numeric) base 10 logarithm
32 Log(x)
33 Mod(x, y)
34 Mod(y, x) remainder of yx
35 Pi()
36 Pi() constant
37 Pow(2 0, 3 0) AS two cubed, pow(2 0, 2 0) AS two squared, pow(2 0, 1 0) AS just two
38 Pow(x, y)
39 Power operator
40 Power(a dp, b dp) a raised to the power of b
41 Power(a numeric, b numeric) numeric a raised to the power of b
42 Radians(d)
43 Random()
44 Round(x)
45 Round(x, s)
46 Select 4e3 AS exponential_float
47 Select 6 1e-2 AS negative_exponent
48 SELECT round(4, 4)
49 Set seed for subsequent random() calls
50 Sin(x)
51 Sqrt(x)
52 Tan(x)
53 Trunc(x)
54 Trunc(x, s)
55 Use pi() in calculation
56 Use trunc function in insert statement