postgresql(2)
生活随笔
收集整理的這篇文章主要介紹了
postgresql(2)
小編覺得挺不錯的,現(xiàn)在分享給大家,幫大家做個參考.
mysql轉(zhuǎn)換postgresql
1)時間格式轉(zhuǎn)換from_unixtime(timestamp,'%Y-%m-%d' )? ==》
SELECT to_char(to_timestamp(t.create_time / 1000), 'YYYY-MM-DD HH24:MI:SS')
2)字段拼接GROUP_CONCAT(restaurantid,'|',cityid)? ==》
select array_to_string(ARRAY(SELECT unnest(array_agg(restaurantid))),'|',(SELECT unnest(array_agg(cityid))))
3)SELECT GROUP_CONCAT(cityid)? ==》SELECT CONCAT(cityid)
4)字段含大寫字母的需要加引號
5)`符號不支持
6)postgresql對類型比較敏感,不同類型不能直接做比較
轉(zhuǎn)載于:https://blog.51cto.com/pmy0425/1752158
總結(jié)
以上是生活随笔為你收集整理的postgresql(2)的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: C语言实现用户输入
- 下一篇: 使用 React和webpack开发和打