Skip to content

Instantly share code, notes, and snippets.

@Justinzobel
Last active October 15, 2023 08:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Justinzobel/f7d8e1a11e7d8afd058258ad342ea46c to your computer and use it in GitHub Desktop.
Save Justinzobel/f7d8e1a11e7d8afd058258ad342ea46c to your computer and use it in GitHub Desktop.
Database Tools Rosetta Stone MySQL PostgreSQL SQLite
Level Action MySQL PostgreSQL SQLite
General Exit quit \quit .quit
Database List Databases show databases; \l .databases
Database Create Database CREATE DATABASE db_name;
Database Connect to a Database use db_name; \c db_name
Table List Tables show tables; \dt .table
Table Describe Table Columns describe table_name; \d table_name .schema table_name
Processses Show Process List show processlist;
Read Data Show All Data select * from table_name; select * from table_name;
Write Data Update Value update table_name set field1 = 'value1' where field2 = 'value2';
Data Views Show Vertically \G \x (toggle) .mode line (toggle)
User Management Change Password \password user_name
User Management Display Users \du
User Management Create User CREATE USER justin;
Task Management Show Tasks show events; Plugin
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment