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

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

WBOY
WBOYOriginal
2016-06-06 09:38:422254browse

mysql数据库

string test;
.....

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

Statement:
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