CREATE VIEW myviewASSELECT city, temp_lo, temp_hi, prcp, date, locationFROM weather, cities WHERE city = name;
建表
create table dwh_timestamp_meta("id" serial NOT NULL,"id" serial primary key,"c_id" serial references cities(id),"mongo_document_name" text default ''::text,"last_update_time" bigint default 0,"execute_time" timestamp with time zone,constraint pk_id primary key(id))with (oids=false);
序列
create table a( id bigint primary key);create sequence a_id_seq start with 1 increment by 1 no minvalue no maxvalue cache 1;alter table a alter column id set default nextval('a_id_seq')