We Recommend

SQL Cookbook SQL Cookbook
Written in O'Reilly's popular Problem/Solution/Discussion style, the SQL Cookbook is sure to please. Anthony's credo is: "When it comes down to it, we all go to work, we all have bills to pay, and we all want to go home at a reasonable time and enjoy what's still available of our days." The SQL Cookbook moves quickly from problem to solution, saving you time each step of the way.


Posted By

arunpjohny on 09/05/07


Tagged

postgres


Versions (?)


Type Cast


Published in: SQL 


URL: http://www.postgresql.org/docs/8.1/static/sql-createcast.html

Cast the given value from one data type to another

  1. SELECT cast(4.8 AS Integer);
  2.  
  3. SELECT cast(4 AS double precision);

Report this snippet 

You need to login to post a comment.