共三种方法
select date '2018-03-05';
select '2018-03-05'::date;
select to_date('2018-03-05', 'YYYY-MM-DD');
select timestamp '2018-03-05 10:23:43';
select '2018-03-05 10:23:43'::timestamp;
select to_timestamp('2018-03-05 13:23:45.485', 'YYYY-MM-DD HH24:MI:SS.MS');
共三种方法
INSERT INTO student VALUES( 901,'张老大', '男', to_date('1989-12-02', 'yyyy-mm-dd'),'计算机系', '北京市海淀区');
INSERT INTO student VALUES( 902,'张老二', '男', '1991-02-01'::date,'中文系', '北京市昌平区');
INSERT INTO student VALUES( 903,'张三', '女',date '1990-03-01','中文系', '湖南省永州市');