MySQL & PostgreSQL 小命令对比 - zzwind's Blog

MySQL & PostgreSQL 小命令对比

zzwind posted @ 2010年4月23日 21:16 in Postgre , 747 阅读
lovefang

对比下一些两个数据库常用的操作。分别使用自带的client程序。

MySQL命令行:

mysql -u 用户名 -h 主机地址 -P 端口号 数据库名 -p

PostgreSQL命令行:

psql -U 用户名 -h 主机地址 -p 端口号 数据库名

操作对比:

mysql                      psql

SHOW DATABASES;           \l
USE db-name;              \c db-name
SHOW TABLES;              \d
SHOW USERS;               \du
SHOW COLUMNS;             \d table-name
SHOW PROCESSLIST;         SELECT * FROM pg_stat_activity;
SELECT now()\G            \x 可以打开和关闭类似\G功能
SOURCE /path.sql          \i /path.sql
LOAD DATA INFILE ...      \copy ...
\h                        \?

Avatar_small
AP SSC sa 2 Question 说:
2022年9月09日 03:28

SA-2 Exams called Summative Assignment-2 exams are known as Annual final public exams, every year those exams are held at the end of the academic session as Term-2 exams. Every State Board Telugu Medium, AP SSC sa 2 Question Paper English Medium & Urdu Medium Students can download the AP 10th Class SA 2 Model Paper 2023 Pdf with Answer Solutions designed by the Board based on the revised syllabus and curriculum.Class teachers and others have designed and suggested the AP 10th Class SA 2 Model Paper 2023 for all languages and subjects of the course for theory, objective,


登录 *


loading captcha image...
(输入验证码)
or Ctrl+Enter
Host by is-Programmer.com | Power by Chito 1.3.3 beta | © 2007 LinuxGem | Design by Matthew "Agent Spork" McGee