在一行中插入值时,我们可以使用任何表达式、函数等自计算输出的值。下面是一个示例来演示它 -
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)