摘要: (1)给予权限:grant grant select on 表名 to 用户名;(2)撤消权限:revoke revoke select on 表名 from 用户名; 阅读全文
posted @ 2015-08-23 21:17 金明爱python 阅读(1679) 评论(0) 推荐(1)
摘要: 一张表 student查询数学和英语都是90分以上的同学,并创建一张新表 test1 阅读全文
posted @ 2015-08-23 21:16 金明爱python 阅读(1599) 评论(0) 推荐(0)
摘要: (1)内部命令create user 用户名 with superuser password '密码'; 先进入数据库后用命令\h create user查看帮助with后面是一些参数。superuser 是指定创建超级用户。createdb 指新用户有创建数据库的权限 password ... 阅读全文
posted @ 2015-08-23 21:14 金明爱python 阅读(2068) 评论(0) 推荐(0)
摘要: 初装postgresql数据库会产生默认的数据库用户postgres和同名的数据库。但是我的linux用户是jm,两者不一致,连不上数据库。于是先把linux用户切换为postgres.(数据库会为linux也产生一个postgres用户)切换以后就可以用命令psql连接了其中-U是指定数据库用户名... 阅读全文
posted @ 2015-08-23 21:11 金明爱python 阅读(2556) 评论(0) 推荐(0)