Home > Database > Mysql Tutorial > mysql-insert into values中select语句与变量怎样组合赋给values???

mysql-insert into values中select语句与变量怎样组合赋给values???

WBOY
Release: 2016-06-06 09:38:42
Original
2265 people have browsed it

mysql数据库

string test;
.....

insert into table(a,b,c) values ('1','2',(select name from tab3 where age =1) + test);
意思就是values里,第三个字段的值是select查询结果 与 变量test的组合。。 我按照上面写,无法入库。。。

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template