random(): Returns a pseudo-random value from 0.0 to 1.0 : random « Math Functions « PostgreSQL

PostgreSQL
1. Aggregate Functions
2. Analytical Functions
3. Array
4. Constraints
5. Cursor
6. Data Type
7. Database
8. Date Timezone
9. Index
10. Inheritance
11. Insert Delete Update
12. Math Functions
13. Postgre SQL
14. Select Query
15. Sequence
16. Store Procedure Function
17. String Functions
18. Subquery
19. Table
20. Table Joins
21. Transaction
22. User Previliege
23. View
Microsoft Office Word 2007 Tutorial
Java
Java Tutorial
Java Source Code / Java Documentation
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
C# / C Sharp
C# / CSharp Tutorial
ASP.Net
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
PHP
Python
SQL Server / T-SQL
Oracle PL / SQL
Oracle PL/SQL Tutorial
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
PostgreSQL » Math Functions » random 
random(): Returns a pseudo-random value from 0.0 to 1.0


postgres=#
postgres=# --random(): Returns a pseudo-random value from 0.0 to 1.0
postgres=# SELECT random() AS natural_random,
postgres-#        round(random() 9AS one_through_ten,
postgres-#        trunc(random() 99AS one_through_one_hundred;
  natural_random   | one_through_ten | one_through_one_hundred
-------------------+-----------------+-------------------------
 0.946445006386584 |               |                      90
(row)

postgres=#
           
       
Related examples in the same category
1. Get random number
w___w_w___.__ja_v___a___2__s__._c___o___m_ | Contact Us
Copyright 2003 - 08 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.