use*_*540 7 postgresql concatenation
我对PostgreSQL中的concat函数有疑问.
这句话适用于MySQL:
SELECT * FROM words
WHERE CONCAT (word,' ',gender,' ',semantic) LIKE '%"+value+"%'.
Run Code Online (Sandbox Code Playgroud)
Value是在我的Java程序中更改的变量.
但我需要在postgresql中使用相同的工作.我是如何使用postgres在WHERE子句中连接的,考虑变量"value"将使其值发生变化?
小智 17
在Postgresql中,您使用以下语法连接:
(users.first_name || ' ' || users.last_name)
Run Code Online (Sandbox Code Playgroud)
参考:http://www.postgresql.org/docs/9.1/static/functions-string.html
| 归档时间: |
|
| 查看次数: |
9870 次 |
| 最近记录: |