SQL Commands

From Fundamental Ramen
Revision as of 04:27, 1 September 2025 by Tacoball (talk | contribs) (→‎GRANT)
Jump to navigation Jump to search

Common Operations

Functions

Postgres MariaDB SQLite
Today

Visiting

Postgres MariaDB SQLite
List tables

show tables;
.tables

GRANT

Postgres MariaDB
on database to user
on table to user

SQLite 3

TODO Command
yyyymmdd to yyyy-mm-dd
SELECT printf('%s-%s-%s',
  SUBSTR(trading_date,1,4),
  SUBSTR(trading_date,5,2),
  SUBSTR(trading_date,7,2)
) FROM short_sell WHERE trading_date='20190605';