在一行中插入值时,我们可以使用任何表达式、函数等自计算输出的值。下面是一个示例来演示它 -Mysql> Insert into employee(id, emp_name)Select 1+1, Concat_ws
在一行中插入值时,我们可以使用任何表达式、函数等自计算输出的值。下面是一个示例来演示它 -
Mysql> Insert into employee(id, emp_name)Select 1+1, Concat_ws(' ','Gaurav', 'Kumar');
Query OK, 1 row affected (0.04 sec)
Records: 1 Duplicates: 0 Warnings: 0
mysql> Select * from employee;
+------+--------------+
| id | emp_name |
+------+--------------+
| 2 | Gaurav Kumar |
+------+--------------+
1 row in set (0.00 sec)
--结束END--
本文标题: 我们如何使用 MySQL 自计算的任何表达式、函数等的输出来在行中插入值?
本文链接: https://www.lsjlt.com/news/437892.html(转载时请注明来源链接)
有问题或投稿请发送至: 邮箱/279061341@qq.com QQ/279061341
下载Word文档到电脑,方便收藏和打印~
2024-05-16
2024-05-16
2024-05-16
2024-05-15
2024-05-15
2024-05-15
2024-05-15
2024-05-15
2024-05-15
2024-05-15
回答
回答
回答
回答
回答
回答
回答
回答
回答
回答
0