例如create table table_config(create_time time ,parameter1 char(32),parameter2 char(32));
我想取出里面特定的时间值,如果使用select create_time from table_config;则取出的是很多时间值,我想取出特定的一个时间值,然后把时间值放入一个数组中,应该怎么操作呀,请教!

解决方案 »

  1.   

    不是很明白你什么意思。如果是想得到create_time在一个时间段里面的记录,可以用查询语句select create_time from table_config where create_time between time1 and time2,就可以得到t1到t2的时间段的记录。
    你这里的字段类型time只有时间吧(像11:14:53),要日期的话用date,要时间和日期的都有的用timestamp with time zone(有带时区),timestamp without time zone(无时区)。