Home > Database > Mysql Tutorial > sql添加数据后返回受影响行数据

sql添加数据后返回受影响行数据

WBOY
Release: 2016-06-07 18:03:39
Original
1442 people have browsed it

Inserted 表用于存储 INSERT 和 UPDATE 语句所影响的行的副本。在一个插入或更新事务处理中,新建行被同时添加到 inserted 表和触发器表中

Inserted 表中的行是触发器表中新行的副本。

语法

返回所有列
INSERT INTO [tableName] ([columnName1],[columnNameN],...) OUTPUT inserted.* VALUES ('value1','value2',...)

返回指定列
INSERT INTO [tableName] ([columnName1],[columnNameN],...) OUTPUT inserted.[columnName] VALUES ('value1','value2',...)


获取数据就跟平常SELECT语句一样的 用vo或者dataset装
Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template