网站首页 美食营养 游戏数码 手工爱好 生活家居 健康养生 运动户外 职场理财 情感交际 母婴教育 时尚美容

ubuntu postgresql 14.04 使用教程

时间:2024-10-14 13:59:43

1、打开终端窗口。输入sudo su postgres然后psql,这样就进入postgres了。

ubuntu postgresql 14.04 使用教程ubuntu postgresql 14.04 使用教程

3、输入\l可以查看当前存在的数据库。

ubuntu postgresql 14.04 使用教程

4、CREATE DATABASE 名字;这样可以创建数据库。

ubuntu postgresql 14.04 使用教程

5、\c 数据库名字;这样可以连接到创建的数据库。

ubuntu postgresql 14.04 使用教程

7、\d可以查看创建的表格。

ubuntu postgresql 14.04 使用教程

9、INSERT INTO 名字(id, name)VALUES();现在可以这样插入数据。

ubuntu postgresql 14.04 使用教程

11、UPDATE 名字 SET name='alice' WHERE id=88;这里是更新已经存在的表格信息。

ubuntu postgresql 14.04 使用教程
© 2025 小知经验
信息来自网络 所有数据仅供参考
有疑问请联系站长 site.kefu@gmail.com