真菌感染吃什么药| 肠胃不好吃什么水果| 梦见把狗打死了是什么意思| 膝关节置换后最怕什么| 理疗师是做什么的| 什么是梅花肉| 苍蝇馆子什么意思| 成吉思汗是什么族| 自渎是什么意思| 电起火用什么灭火器| 法盲是什么意思| 夺魁是什么意思| 淋巴发炎是什么症状| 孕妇喝什么汤好| 小狗不能吃什么| 半夜喉咙痒咳嗽是什么原因| 结肠炎吃什么药效果最好| 小猫呕吐吃什么药| 福泽深厚什么意思| 绝膑而亡是什么意思| 中队长是什么级别| 抑郁症什么症状表现| 纪梵希属于什么档次| 连续做噩梦是什么原因| 喝蒲公英根有什么好处| 什么的歌声| 男女双修什么意思| 缺铁性贫血吃什么补血最快| 人参补什么| 肚子胀不消化吃什么药| 宣字五行属什么| 皮肤黏膜是什么| 静心什么意思| 高铁与动车的区别是什么| 阿尔茨海默病吃什么药| lv是什么| 流产可以吃什么水果| 吃什么食物可以去湿气| 印度信仰什么教| 部队大校是什么级别| 血气分析是检查什么的| 走青是什么意思| 源源不断是什么意思| 什么无云| 欲钱看正月初一是什么生肖| 馒头逼是什么| 胆囊炎挂什么科| 触及是什么意思| 生孩子送什么花比较好| 梦见家里好多蛇是什么预兆| 自闭症是什么原因引起| 衣柜放什么代替樟脑丸| 什么是盆腔炎| 经常腿麻是什么原因| 榛子是什么树的果实| 言过其实是什么意思| 吃马齿苋有什么好处| 鼻炎吃什么药最好| 黄雀是什么鸟| 夫妻少配无刑是什么意思| 月经前乳房胀痛是什么原因| 空指什么生肖| 桑蚕丝用什么洗最好| 杜冷丁是什么药| 白带是绿色的是什么原因| 小孩做ct对身体有什么影响| 生死离别代表什么生肖| 拔掉智齿有什么影响| 耳朵前面有痣代表什么| 湿疹是什么原因造成的| wbc是什么| 梦到拉粑粑是什么意思| xxoo什么意思| 病符是什么意思| 骨折吃什么消炎药| 前列腺钙化灶是什么| 神经性头疼是什么症状| 阴虱病是什么原因引起的| 肾素低说明什么| 6月12日什么星座| 点石成金是什么意思| 2007年是什么生肖| 玄牝是什么意思| 角色扮演是什么意思| 猪肉和什么菜搭配最好| 火山为什么会喷发| 站点是什么意思| 眼皮浮肿是什么原因引起的| 为什么男的叫鸭子| 五指毛桃长什么样子| 深柜是什么意思| 梦见洗脚是什么意思| lee是什么档次| 干眼症滴什么眼药水好| 什么人容易长智齿| 耳朵旁边长痘痘是什么原因| 酸碱度偏低是什么原因| 大便恶臭是什么原因| 肚子疼拉肚子吃什么药| 四季更迭是什么意思| 心衰挂什么科| 什么是假性狐臭| 面瘫挂什么科室| 10月出生是什么星座| 打豆豆什么意思| 儿童缺铁吃什么补得快| 菊花有什么功效和作用| 什么人不能吃榴莲| 什么的眼泪| 头上长了个包挂什么科| 1月26号是什么星座| 羊奶粉和牛奶粉有什么区别| 卖萌什么意思| 狗脊是什么东西| 冬枣是什么季节的水果| fashion什么意思| 翘嘴鱼是什么鱼| bp在医学上是什么意思| 上头是什么意思| 结缔组织是什么| 什么奶茶最好喝| 脑白质病变是什么病| 体外射精是什么意思| 可刀是什么意思| 什么好| 暮光是什么意思| 庚子五行属什么| 屁眼疼是什么原因| 任督二脉是什么意思| 气血两亏是什么意思| 徒木立信是什么意思| 艾附暖宫丸什么时候吃| 什么人容易得骨肿瘤| 怀孕日期是从什么时候开始算| 金匮肾气丸治什么病| 手指头痒是什么原因| 忌廉是什么东西| 喝什么茶清肺效果最好| 萤火虫为什么会发光简单回答| 拿铁咖啡什么意思| 股骨头坏死什么原因| 男神是什么意思| 水中加什么擦玻璃干净| 总胆固醇低是什么原因| 小孩磨牙是什么原因| 内分泌失调什么意思| 干红是什么意思| 天龙八部是指佛教中的什么| 兔子是什么意思| 缘定三生是什么意思| 芒果吃了有什么好处| 海外是什么意思| 手五行属什么| 什么是性瘾症| 为什么会出现眼袋| 黄精和什么搭配补肾效果最好| 软件开发属于什么行业| 什么的形状| 什么叫女人味| 上校相当于政府什么官| 什么是全运会| 菩提根是什么材质| 随礼钱有什么讲究| ttm是什么意思| 什么是阴阳人| 一什么鼓| 汴去掉三点水念什么| 心脏不舒服挂什么科| 6周岁打什么疫苗| 脚为什么会痒越抓越痒| 全麦粉和小麦粉的区别是什么| 绿豆配什么打豆浆最好| 肺炎吃什么药有效| 尿素氮偏高是什么原因| 不亚于是什么意思| 维生素b族什么时候吃最好| 殊荣是什么意思| Joyce什么意思| 水稻什么时候播种| 青蛙吃什么| 钾偏低是什么原因| 521什么星座| 蒲公英和什么一起泡水喝最好| 黑色素通过什么排出来| 女人眼角有痣代表什么| 党内的最高处分是什么| 黄芪可以和什么一起泡水喝| 楞头青是什么意思| 什么是红肉| 什么人不能喝豆浆| 无印良品是什么意思| 产妇吃什么下奶快又多又营养| 乏力是什么原因| 维生素c对身体有什么好处| 什么是早恋| 什么的玉米| 三心二意是指什么生肖| 沉香木是什么| 喝酒吐血是什么原因| 四月份是什么季节| 凝望什么| 早唐筛查是检查什么| 鸡胗炒什么菜好吃| 常吐痰是什么原因| 优字五行属什么| 粉底和气垫的区别是什么| 牙龈炎吃什么药最有效| 做俯卧撑有什么好处| 报仇是什么意思| 尿里有结晶是什么原因| 人中白是什么| 一建什么时候报名| 鲁迅为什么弃医从文| mk是什么意思| 黑便是什么原因| cln是什么意思| 补血吃什么好| 打葡萄糖点滴有什么用| 什么是痔疮早期图片| 肛门坠胀是什么原因| 和什么细什么的成语| 为什么一紧张就想拉屎| 梦见自己生了个女儿是什么预兆| 什么鱼| 止疼药吃多了有什么副作用| 痔疮是什么| 发字五行属什么| 耳后长痣代表什么意思| 桥本甲状腺炎挂什么科| 裂隙灯能查出什么眼病| 从胃到小腹连着疼是什么原因| 血脂高低看什么指标| 拉肚子吃什么水果好| 百草霜是什么| 一个火一个华念什么| 9月14日是什么星座| 标题是什么意思| 什么时候开始暑伏| 2006年属什么生肖| 虫加合念什么| 宁的五行属性是什么| 流年是什么| da是什么意思| 爵是什么器皿| 东北人喜欢吃什么菜| 宝宝睡觉头上出汗多是什么原因| 海螺姑娘是什么意思| 复古是什么意思| 意思是什么意思| 反应蛋白高是什么原因| 甲亢都有什么症状| 我可以组什么词| 锦绣未央什么意思| 仔细的什么| 喜欢出汗是什么原因| 低血压低是什么原因| 风寒感冒吃什么水果| 61年属什么生肖| 孩子晚上磨牙是什么原因| 梦见发大水是什么预兆| 嘴唇肿是什么原因| 梦见自己掉头发是什么征兆| 遇到黄鼠狼是什么征兆| 草鱼又叫什么鱼| 百度
Supported Versions: Current (17) / 16 / 15 / 14 / 13
Development Versions: 18 / devel
Unsupported versions: 12 / 11 / 10 / 9.6 / 9.5 / 9.4 / 9.3 / 9.2 / 9.1 / 9.0 / 8.4 / 8.3 / 8.2 / 8.1 / 8.0 / 7.4 / 7.3 / 7.2 / 7.1
This documentation is for an unsupported version of PostgreSQL.
You may want to view the same page for the current version, or one of the other supported versions listed above instead.

宁波文创产业目标:"十三五"末造成千亿级产业

Name

INSERT -- create new rows in a table

Synopsis

百度   从政策层面看,有关方面一直在强调减轻学生负担,目前备受争议的“下午三点半放学”,初衷就是为了减少学生的在校时间,免于补课等教学活动而确定的。
[ WITH [ RECURSIVE ] with_query [, ...] ]
INSERT INTO table_name [ ( column_name [, ...] ) ]
    { DEFAULT VALUES | VALUES ( { expression | DEFAULT } [, ...] ) [, ...] | query }
    [ RETURNING * | output_expression [ [ AS ] output_name ] [, ...] ]

Description

INSERT inserts new rows into a table. One can insert one or more rows specified by value expressions, or zero or more rows resulting from a query.

The target column names can be listed in any order. If no list of column names is given at all, the default is all the columns of the table in their declared order; or the first N column names, if there are only N columns supplied by the VALUES clause or query. The values supplied by the VALUES clause or query are associated with the explicit or implicit column list left-to-right.

Each column not present in the explicit or implicit column list will be filled with a default value, either its declared default value or null if there is none.

If the expression for any column is not of the correct data type, automatic type conversion will be attempted.

The optional RETURNING clause causes INSERT to compute and return value(s) based on each row actually inserted. This is primarily useful for obtaining values that were supplied by defaults, such as a serial sequence number. However, any expression using the table's columns is allowed. The syntax of the RETURNING list is identical to that of the output list of SELECT.

You must have INSERT privilege on a table in order to insert into it. If a column list is specified, you only need INSERT privilege on the listed columns. Use of the RETURNING clause requires SELECT privilege on all columns mentioned in RETURNING. If you use the query clause to insert rows from a query, you of course need to have SELECT privilege on any table or column used in the query.

Parameters

with_query

The WITH clause allows you to specify one or more subqueries that can be referenced by name in the INSERT query. See Section 7.8 and SELECT for details.

It is possible for the query (SELECT statement) to also contain a WITH clause. In such a case both sets of with_query can be referenced within the query, but the second one takes precedence since it is more closely nested.

table_name

The name (optionally schema-qualified) of an existing table.

column_name

The name of a column in the table named by table_name. The column name can be qualified with a subfield name or array subscript, if needed. (Inserting into only some fields of a composite column leaves the other fields null.)

DEFAULT VALUES

All columns will be filled with their default values.

expression

An expression or value to assign to the corresponding column.

DEFAULT

The corresponding column will be filled with its default value.

query

A query (SELECT statement) that supplies the rows to be inserted. Refer to the SELECT statement for a description of the syntax.

output_expression

An expression to be computed and returned by the INSERT command after each row is inserted. The expression can use any column names of the table named by table_name. Write * to return all columns of the inserted row(s).

output_name

A name to use for a returned column.

Outputs

On successful completion, an INSERT command returns a command tag of the form

INSERT oid count

The count is the number of rows inserted. If count is exactly one, and the target table has OIDs, then oid is the OID assigned to the inserted row. Otherwise oid is zero.

If the INSERT command contains a RETURNING clause, the result will be similar to that of a SELECT statement containing the columns and values defined in the RETURNING list, computed over the row(s) inserted by the command.

Examples

Insert a single row into table films:

INSERT INTO films VALUES
    ('UA502', 'Bananas', 105, '2025-08-08', 'Comedy', '82 minutes');

In this example, the len column is omitted and therefore it will have the default value:

INSERT INTO films (code, title, did, date_prod, kind)
    VALUES ('T_601', 'Yojimbo', 106, '2025-08-08', 'Drama');

This example uses the DEFAULT clause for the date columns rather than specifying a value:

INSERT INTO films VALUES
    ('UA502', 'Bananas', 105, DEFAULT, 'Comedy', '82 minutes');
INSERT INTO films (code, title, did, date_prod, kind)
    VALUES ('T_601', 'Yojimbo', 106, DEFAULT, 'Drama');

To insert a row consisting entirely of default values:

INSERT INTO films DEFAULT VALUES;

To insert multiple rows using the multirow VALUES syntax:

INSERT INTO films (code, title, did, date_prod, kind) VALUES
    ('B6717', 'Tampopo', 110, '2025-08-08', 'Comedy'),
    ('HG120', 'The Dinner Game', 140, DEFAULT, 'Comedy');

This example inserts some rows into table films from a table tmp_films with the same column layout as films:

INSERT INTO films SELECT * FROM tmp_films WHERE date_prod < '2025-08-08';

This example inserts into array columns:

-- Create an empty 3x3 gameboard for noughts-and-crosses
INSERT INTO tictactoe (game, board[1:3][1:3])
    VALUES (1, '{{" "," "," "},{" "," "," "},{" "," "," "}}');
-- The subscripts in the above example aren't really needed
INSERT INTO tictactoe (game, board)
    VALUES (2, '{{X," "," "},{" ",O," "},{" ",X," "}}');

Insert a single row into table distributors, returning the sequence number generated by the DEFAULT clause:

INSERT INTO distributors (did, dname) VALUES (DEFAULT, 'XYZ Widgets')
   RETURNING did;

Increment the sales count of the salesperson who manages the account for Acme Corporation, and record the whole updated row along with current time in a log table:

WITH upd AS (
  UPDATE employees SET sales_count = sales_count + 1 WHERE id =
    (SELECT sales_person FROM accounts WHERE name = 'Acme Corporation')
    RETURNING *
)
INSERT INTO employees_log SELECT *, current_timestamp FROM upd;

Compatibility

INSERT conforms to the SQL standard, except that the RETURNING clause is a PostgreSQL extension, as is the ability to use WITH with INSERT. Also, the case in which a column name list is omitted, but not all the columns are filled from the VALUES clause or query, is disallowed by the standard.

Possible limitations of the query clause are documented under SELECT.

盖碗适合泡什么茶 次日是什么意思 子宫偏小是什么原因 吃什么清理血管 奇花异草的异是什么意思
正部级是什么级别 pangchi是什么牌子的手表 细菌性阴道炎是什么原因引起的 若什么若什么的成语 印堂发黑是什么原因
3月14日是什么星座 梦到头发白了是什么意思 手术室为什么那么冷 谷草谷丙高是什么原因 霞字五行属什么
五行缺木是什么命 一根长寿眉预示什么 打一个喷嚏代表什么 送葬后回家注意什么 做蛋糕用什么油
吃什么补血最好最快hcv8jop6ns4r.cn 东北方五行属什么hcv9jop2ns4r.cn 鸟儿为什么会飞hcv9jop5ns7r.cn 什么病会引起皮肤瘙痒hcv8jop8ns7r.cn 双数是什么zsyouku.com
尿液里白细胞高是什么原因hcv9jop3ns2r.cn 农历9月14日是什么星座hcv8jop5ns1r.cn 血糖吃什么水果hcv9jop1ns0r.cn 查甲状腺应该挂什么科hcv9jop3ns2r.cn 私生子是什么意思hcv9jop0ns2r.cn
三点水一个分读什么inbungee.com 什么可以保护眼睛sanhestory.com 了是什么词性hebeidezhi.com 子宫内膜异位症有什么症状表现hcv9jop5ns4r.cn 古驰是什么牌子hcv9jop4ns5r.cn
牙齿黄是什么原因造成的jinxinzhichuang.com 墨西哥讲什么语言hcv9jop1ns3r.cn 升米恩斗米仇是什么意思hcv8jop7ns9r.cn 1959年属什么生肖mmeoe.com 成龙姓什么zsyouku.com
百度