postgresql中的returning

返回修改,插入,删除的数据.
'returning *'意思是返回你操作的全部数据,‘returning id ’,‘returning name’意思是返回你操作修改,插入,删除数据的id或者name,简言之就是,returning可以返回你想返回数据的全部信息或者部分信息。

举例子:

返回被update语句执行的数据的全部信息:

在这里插入图片描述

返回被insert语句执行的数据的id:
在这里插入图片描述

返回被delete语句执行的数据的name:
在这里插入图片描述

  • 1
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
序文 I. 入门指引 1. 简介 2. 简明教程 3. 安装 4. 运行时配置 II. 语言参考 5. 基本语法 6. 类型 7. 变量 8. 常量 9. 表达式 10. 运算符 11. 流程控制 12. 函数 13. 类与对象 14. 引用的解释 III. 安全 15. 安全 IV. 特点 16. 用 PHP 进行 HTTP 认证 17. Cookies 18. 文件上传处理 19. 使用远程文件 20. 连接处理 21. 数据库永久连接 22. 安全模式 23. PHP 的命令行模式 V. 函数参考 I. Apache 函数库 II. 数组函数库 III. Aspell functions [deprecated] IV. BCMath Arbitrary Precision Mathematics Functions V. Bzip2 Compression Functions VI. Calendar Functions VII. CCVS API Functions [deprecated] VIII. Windows 的 COM 支持函数库 IX. 类/对象函数库 X. ClibPDF Functions XI. Crack Functions XII. CURL, Client URL Library Functions XIII. Cybercash Payment Functions XIV. Cyrus IMAP administration Functions XV. Character Type Functions XVI. Database (dbm-style) Abstraction Layer Functions XVII. 时间日期函数库 XVIII. dBase Functions XIX. DBM Functions [deprecated] XX. dbx Functions XXI. DB++ Functions XXII. Direct IO Functions XXIII. 目录函数库 XXIV. DOM XML Functions XXV. .NET Functions XXVI. Error Handling and Logging Functions XXVII. File Alteration Monitor Functions XXVIII. FrontBase Functions XXIX. filePro Functions XXX. 文件系统函数库 XXXI. Forms Data Format Functions XXXII. FriBiDi Functions XXXIII. FTP 函数库 XXXIV. Function Handling Functions XXXV. Gettext XXXVI. GMP Functions XXXVII. HTTP 相关函数库 XXXVIII. Hyperwave Functions XXXIX. Hyperwave API Functions XL. iconv Functions XLI. 图像函数库 XLII. IMAP, POP3 and NNTP Functions XLIII. Informix Functions XLIV. InterBase Functions XLV. Ingres II Functions XLVI. IRC Gateway Functions XLVII. PHP / Java Integration XLVIII. LDAP Functions XLIX. LZF Functions L. Mail Functions LI. mailparse Functions LII. 数学函数库 LIII. Multi-Byte String Functions LIV. MCAL Functions LV. Mcrypt Encryption Functions LVI. MCVE Payment Functions LVII. Mhash Functions LVIII. Mimetype Functions LIX. Microsoft SQL Server Functions LX. Ming functions for Flash LXI. Miscellaneous Functions LXII. mnoGoSearch Functions LXIII. mSQL Functions LXIV. MySQL 函数库 LXV. Improved MySQL Extension LXVI. Mohawk Software Session Handler Functions LXVII. muscat Functions LXVIII. Network Functions LXIX. Ncurses Terminal Screen Control Functions LXX. Lotus Notes Functions LXXI. NSAPI-specific Functions LXXII. Unified ODBC Functions LXXIII. Object Aggregation/Composition Functions LXXIV. Oracle 8 函数库 LXXV. OpenSSL Functions LXXVI. Oracle 函数库 LXXVII. Ovrimos SQL Functions LXXVIII. 输出控制函数 LXXIX. Object property and method call overloading LXXX. PDF functions LXXXI. Verisign Payflow Pro Functions LXXXII. PHP Options&Information LXXXIII. POSIX Functions LXXXIV. PostgreSQL 数据库函数库 LXXXV. Process Control Functions LXXXVI. Program Execution Functions LXXXVII. Printer Functions LXXXVIII. Pspell Functions LXXXIX. GNU Readline XC. GNU Recode Functions XCI. 正则表达式函数库(Perl 兼容) XCII. qtdom Functions XCIII. 正则表达式函数库(POSIX 扩展) XCIV. Semaphore, Shared Memory and IPC Functions XCV. SESAM Database Functions XCVI. Session Handling Functions XCVII. Shared Memory Functions XCVIII. SimpleXML functions XCIX. SOAP Functions C. SQLite CI. Shockwave Flash Functions CII. SNMP 函数库 CIII. Socket Functions CIV. Standard PHP Library (SPL) Functions CV. Stream Functions CVI. 字符串处理函数库 CVII. Sybase Functions CVIII. TCP Wrappers Functions CIX. Tidy Functions CX. Tokenizer Functions CXI. URL 函数库 CXII. 变量函数库 CXIII. vpopmail Functions CXIV. W32api 函数库 CXV. WDDX Functions CXVI. XML 语法解析函数库 CXVII. XML-RPC 函数库 CXVIII. xdiff Functions CXIX. XSLT Functions CXX. YAZ Functions CXXI. YP/NIS Functions CXXII. Zip File Functions (Read Only Access) CXXIII. Zlib Compression Functions VI. Zend API 24. Overview 25. Extension Possibilities 26. Source Layout 27. PHP's Automatic Build System 28. Creating Extensions 29. Using Extensions 30. Troubleshooting 31. Source Discussion 32. Accepting Arguments 33. Creating Variables 34. Duplicating Variable Contents: The Copy Constructor 35. Returning Values 36. Printing Information 37. Startup and Shutdown Functions 38. Calling User Functions 39. Initialization File Support 40. Where to Go from Here 41. Reference: Some Configuration Macros 42. API Macros VII. PHP API: 扩展开发接口 43. Streams API for PHP Extension Authors VIII. FAQ: 常见问题 44. 一般信息 45. 邮件列表 46. 获取 PHP 47. 数据库问题 48. 安装 49. 编译问题 50. 使用 PHP 51. PHP 和 HTML 52. PHP 和 COM 53. PHP 和其它语言 54. 从 PHP/FI 2 移植到 PHP 3 55. 从 PHP 3 移植到 PHP 4 56. 杂类问题 IX. 附录 A. PHP 及其相关工程的历史 B. Migrating from PHP 4 to PHP 5 C. 从 PHP 3 移植到 PHP 4 D. 从 PHP/FI 2 移植到 PHP 3 E. PHP 的调试 F. 扩展 PHP 3 G. 函数别名列表 H. 保留字列表 I. 资源类型列表 J. 支持的协议/封装协议列表 K. 所支持的套接字传输器(Socket Transports)列表 L. PHP 类型及比较符表 M. 解析器代号列表 N. 关于本手册 O. Open Publication License P. 函数索引 Q. 补充说明 X. 微软 HTML 帮助版本 57. 关于此版本 58. Using PHP Manual CHM Edition 59. The Full Text Search 60. Specialities of this Edition 61. Integrating the PHP Manual 62. Skin development 63. CHM Edition Credits

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值