Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/mysql/72.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/postgresql/9.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
如何将此语句从mySQL更改为PostgreSQL_Mysql_Postgresql - Fatal编程技术网

如何将此语句从mySQL更改为PostgreSQL

如何将此语句从mySQL更改为PostgreSQL,mysql,postgresql,Mysql,Postgresql,如何将此命令从mySQl更改为PostgreSQL 从'student'中选择*,其中CONCAT('first\u name','last\u name','phone','address')类似于?该代码也应在postgresql中使用,但不应在列名周围使用单引号 SELECT * FROM student WHERE CONCAT(first_name, last_name, phone, address) LIKE ? 可能是你的“喜欢”匹配参数需要一些wildchar S

如何将此命令从mySQl更改为PostgreSQL


从'student'中选择*,其中CONCAT('first\u name','last\u name','phone','address')类似于?

该代码也应在postgresql中使用,但不应在列名周围使用单引号

 SELECT * 
 FROM student 
 WHERE CONCAT(first_name, last_name, phone, address) LIKE ?
可能是你的“喜欢”匹配参数需要一些wildchar

 SELECT * 
 FROM student 
 WHERE CONCAT(first_name, last_name, phone, address) LIKE concat('%',?,'%')

博士后对此有何评论?您是否对“postgres中的concat”进行了肤浅的搜索?回答1)错误:语法错误在或接近“;”和回答2)错误:语法错误在或接近“,”更新您的问题并添加您正在使用的确切代码。。反正答案不清楚;