在将值插入一行时,我们可以使用任何表达式,函数等的自计算输出值。下面是一个示例来演示它-
mysql> Insert into employee(id, emp_name)Select 1+1, Concat_ws(' ','Gaurav', 'Kumar');
Records: 1 Duplicates: 0 Warnings: 0
mysql> Select * from employee;
+------+--------------+
| id | emp_name |
+------+--------------+
| 2 | Gaurav Kumar |
+------+--------------+
1 row in set (0.00 sec)