There are no problems in the reading process. Welcome to communicate together
Email:[email protected]
qq:1494713801
One, PostgreSQL time type conversion
--The time type is converted into character type select To_char (current_date, ' yyyy/mm/dd '); select To_char (current_date, ' yyyy-mm-dd '); select To_char (now (), ' yyyy-mm-dd '); select To_char (Current_timestamp, ' HH:MI:SS '); select To_char (Current_timestamp, ' yyyy/ Mm/dd HH:MI:SS '); --The string type is converted to the time type select To_date (' 2012/05/22 ', ' yyyy/mm/dd '); Select To_date (' 2012-05-22 ', ' yyyy-mm-dd '); select To_timestamp (' Sep ', ' DD mon YYYY '), select To_timestamp (' 2012/05/22 ', ' yyyy/mm/dd '); Select To_timestamp (' 2012/ 05/22 02:55:46 ', ' yyyy/mm/dd HH:MI:SS '); Select To_timestamp (' 2012/05/22 02:55:46 ', ' yyyy/mm/dd HH:MI:SS MS ');
Ii. postgresqL-Unique type conversion operator
:: is a type conversion operator
For example: AVG (accesscount):: int4--Converts the value of AVG (Accesscount) to Int4
"PostgreSQL" PostgreSQL syntax