PostgreSQL 8.2.3 婺桺桺懼
劯锔媆锔䆹2. SQL 臺蘔媆誕嬉誕

2.4. 劏臘婺時媹臯

INSERT 臺埖䫘庯劏臘婺時媹臯

INSERT INTO weather VALUES ('San Francisco', 46, 50, 0.25, '1994-11-27');

臙濘懟欔橬昄扞䌂傋鄘嘪䫘庖䕩嘷滯庖䔇膷噖湚嚟㔗闼底婉滇䞔剘昄庖唚䔇婩麟媙驔䫘剘嚘埙(')寙啘儌償婘冋床麯婔湙㔗date 䌂傋垂鍙婪凹埇毖櫽䔇湚嚟䕩嘷䕕昂婉誺婘橸嘺䇔昍䘋麯潏傸庫臖应毕嘪䫘認麯滆䴺䔇湚嚟㔗

point 䌂傋襕挗婔婻库湺凹嘩婺膷噖套婋

INSERT INTO cities VALUES ('San Francisco', '(-194.0, 53.0)');

彄䕞嬉婺溵嘪䫘䔇臺濘襕挗嘹螄嘟庖枕䔇釺废㔗婔婻埇锬䔇臺濘噕螩嘹滯䇞婄彖庺庖枕

INSERT INTO weather (city, temp_lo, temp_hi, prcp, date)
    VALUES ('San Francisco', 43, 57, 0.0, '1994-11-29');

套悩驔襕嘹埇傖䫘埥崡婔婻釺废彖庺庖枕潡蔙滇媘䘖昊底庖枕懫套臘潏傸婉䘖長鍉愘麟

INSERT INTO weather (date, city, temp_hi, temp_lo)
    VALUES ('1994-11-29', 'Hayward', 54, 37);

螩崔嚔埏庺叻螴婺滯䇞彖庺庖枕襕懫冺蕡锊劆䔇釺废滇敘喘䔇鼯湚㔗

臙膷噖婪麵滆䴺䔇欔橬变傴認湙嘹婘锟劯䔇劇誗婺欉橬埇䫘䔇昄扞㔗

嘹誻埇傖嘪䫘 COPY 傯桺橸桺傽婺輙蘘崓麟昄扞㔗認幽幾锔婩敘媆啹婺 COPY 变傴儌滇婺認䌂庫䫘嚻寡䔇埻滇懫 INSERT 儏婔底䕕昂攓㔗懫套

COPY weather FROM '/home/user/weather.txt';

認麯溊桺傽䔇桺傽劉媙釂滇劯䆇橉媇単埇螪閞䔇蔯婉滇垵潙䆇埇螪閞䔇啹婺劯䆇橉媇単䕘毖臂埡桺傽㔗嘹埇傖婘 COPY 婺臂彄敘崔橬噿 COPY 变傴䔇媇敇㔗


劯锔饡釕嬉誕
录傺桄臘婪婔亓昖臵婔婻臘