
借助 MySQL 语句末尾的 G 或 g 选项,我们可以在没有分号的情况下运行它。考虑下面的例子 –
mysql> Select * from Stock_itemG*************************** 1. row ***************************item_name: Calculator Value: 15 Quantity: 89*************************** 2. row ***************************item_name: Notebooks Value: 63 Quantity: 40*************************** 3. row ***************************item_name: Pencil Value: 15 Quantity: 40*************************** 4. row ***************************item_name: Pens Value : 65Quantity: 32*************************** 5. row ***************************item_name: Shirts Value: 13 Quantity: 29*************************** 6. row ***************************item_name: Shoes Value: 15 Quantity: 29*************************** 7. row ***************************item_name: Trousers Value: 15 Quantity: 297 rows in set (0.00 sec)
上面带有 G(省略分号)的查询以垂直格式返回结果集。
一览运营宝
一览“运营宝”是一款搭载AIGC的视频创作赋能及变现工具,由深耕视频行业18年的一览科技研发推出。
41 查看详情
mysql> Select * from Stock_itemg+------------+-------+----------+| item_name | Value | Quantity |+------------+-------+----------+| Calculator | 15 | 89 || Notebooks | 63 | 40 || Pencil | 15 | 40 || Pens | 65 | 32 || Shirts | 13 | 29 || Shoes | 15 | 29 || Trousers | 15 | 29 |+------------+-------+----------+7 rows in set (0.00 sec)
上面带有 g(省略分号)的查询以表格格式返回结果集。
以上就是如何运行没有终止分号的 MySQL 语句?的详细内容,更多请关注创想鸟其它相关文章!
版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。
如发现本站有涉嫌抄袭侵权/违法违规的内容, 请发送邮件至 chuangxiangniao@163.com 举报,一经查实,本站将立刻删除。
发布者:程序猿,转转请注明出处:https://www.chuangxiangniao.com/p/321710.html
微信扫一扫
支付宝扫一扫