您的位置:首页 > 数据库

PostgreSQL基本命令

2016-07-26 15:34 169 查看

1.Linux下查看是否开启

lsof -i:5432

2.可以用postgresql自带psql程序,导入sql语句

psql  -U username -W -d dbname -f xx.sql

3.psql远程登录命令

  psql -h xxxxx  -U  dbuser   -p port  -d dbname.

4替换为空字符查询(oracle为ORACLE 有NVL函数)

CASE WHEN D.wk_ptn_cd IS NULL THEN '00' ELSE D.wk_ptn_cd END AS wk_ptn_cd

select COALESCE(D.wk_ptn_cd, '00') as wk_ptn_cd

 

 

 

阅读更多
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: