SQL Commands: Difference between revisions
Jump to navigation
Jump to search
(→GRANT) |
|||
| Line 29: | Line 29: | ||
! || Postgres || MariaDB | ! || Postgres || MariaDB | ||
|- | |- | ||
| | | Database Level | ||
| <syntaxhighlight lang="sql"> | |||
</syntaxhighlight> | |||
| <syntaxhighlight lang="sql"> | |||
</syntaxhighlight> | |||
|- | |||
| Table Level | |||
| <syntaxhighlight lang="sql"> | |||
</syntaxhighlight> | |||
| <syntaxhighlight lang="sql"> | |||
</syntaxhighlight> | |||
|- | |||
| Table Level | |||
| <syntaxhighlight lang="sql"> | |||
</syntaxhighlight> | |||
| <syntaxhighlight lang="sql"> | |||
</syntaxhighlight> | |||
|- | |||
| Table Level | |||
| <syntaxhighlight lang="sql"> | | <syntaxhighlight lang="sql"> | ||
</syntaxhighlight> | </syntaxhighlight> | ||
Revision as of 04:25, 1 September 2025
Common Operations
Functions
| Postgres | MariaDB | SQLite | |
|---|---|---|---|
| Today |
Visiting
| Postgres | MariaDB | SQLite | |
|---|---|---|---|
| List tables | show tables; |
.tables |
GRANT
| Postgres | MariaDB | |
|---|---|---|
| Database Level | ||
| Table Level | ||
| Table Level | ||
| Table Level |
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';
|