Search
 
SCRIPT & CODE EXAMPLE
 

SQL

how to casting data types in postgresql

CAST( expression AS target_type); 
-- example) extract from String into an integer
SELECT CAST('500' AS INTEGER);
--  or 
expression :: type
-- example) extract from '2019-07-13 1:20:50' to '2019-07-13'
SELECT '2019-07-13 1:20:50'::TIMESTAMP::DATE;
Comment

PREVIOUS NEXT
Code Example
Sql :: installed mysql-server-8.0 package post-installation script subprocess returned error exit status 1 
Sql :: sql query to create table in database 
Sql :: how to get parent and child record in single query using sql 
Sql :: oracle inner join 
Sql :: mysqli inner join (php) 
Sql :: sql duplicate a table with data 
Sql :: update set table column to null 
Sql :: right join sql 
Sql :: select mysql limit to 2 decimal places 
Sql :: oracle pl/sql package 
Sql :: mysql concat and use as where column 
Sql :: initcap in sql 
Sql :: mysql where in maintain order group_concat 
Sql :: datagrip exec 
Sql :: oracle alter table add column 
Sql :: oracle find foreign key dependencies 
Sql :: square in sql 
Sql :: get stored procedure text sql server 
Sql :: fk in insert mysql 
Sql :: SQL Query to delete all the tables in a database 
Sql :: like query 
Sql :: ORACLE sql join multiple tables 
Sql :: sql select on string 
Sql :: sql highest salary by location 
Sql :: set engine to innodb 
Sql :: disable module odoo 
Sql :: update field in sql to null 
Sql :: how to get second highest salary in each department in sql 
Sql :: java sql connection close 
Sql :: convert all tables in database to from myisam to innodb 
ADD CONTENT
Topic
Content
Source link
Name
4+2 =