Damien Gonot

SQL

Homepage / Notes / Computer Science / Programming Languages / SQL

Commands

SELECT

UPDATE

DELETE

DELETE FROM {table_name} WHERE {column_name} = {condition};

INSERT INTO

CREATE TABLE

ALTER TABLE

DROP TABLE

PostgreSQL

psql commands

\c table_name switch to table_name \d table_name to desscribe table_name

Upgrade DB on macOS

brew postgresql-upgrade-database

Access CLI

psql postgres

SQLite

prql

https://github.com/prql/prql

PRQL is a modern language for transforming data — a simple, powerful, pipelined SQL replacement

HAVING clause

https://smallthingssql.com/having-a-less-understood-sql-clause

Resources

Let's talk about joins

https://cghlewis.com/blog/joins/

Solve mysteries through SQL

https://www.sqlnoir.com/