-- small:
select {column} from {table name}[join {expr}] [where {expr}]
[group by {expr}] [order by {expr}] [limit {expr}]
-- full:
[with [recursive] {expr}] select [distinct,all] {column}
from {table name}[join {expr}] [where {expr}]
[group by {expr} [having {expr}]] [values ({expr})]
[order by {expr}] [limit {expr}]
Example
select * from demo
SELECT
[ALL | DISTINCT | DISTINCTROW]
[HIGH_PRIORITY]
[STRAIGHT_JOIN]
[SQL_SMALL_RESULT] [SQL_BIG_RESULT] [SQL_BUFFER_RESULT]
[SQL_CACHE | SQL_NO_CACHE] [SQL_CALC_FOUND_ROWS]
select_expr [, select_expr ...]
[ FROM table_references
[WHERE where_condition]
[GROUP BY {col_name | expr | position} [ASC | DESC], ... [WITH ROLLUP]]
[HAVING where_condition]
[ORDER BY {col_name | expr | position} [ASC | DESC], ...]
[LIMIT {[offset,] row_count | row_count OFFSET offset}]
procedure|[PROCEDURE procedure_name(argument_list)]
[INTO OUTFILE 'file_name' [CHARACTER SET charset_name] [export_options]
INTO DUMPFILE 'file_name' INTO var_name [, var_name] ]
[[FOR UPDATE | LOCK IN SHARE MODE] [WAIT n | NOWAIT] ] ]
export_options:
[{FIELDS | COLUMNS}
[TERMINATED BY 'string']
[[OPTIONALLY] ENCLOSED BY 'char']
[ESCAPED BY 'char']
]
[LINES
[STARTING BY 'string']
[TERMINATED BY 'string']
]
[ WITH [ RECURSIVE ] with_query [, ...] ]
SELECT [ ALL | DISTINCT [ ON ( expression [, ...] ) ] ]
[ * | expression [ [ AS ] output_name ] [, ...] ]
[ FROM from_item [, ...] ]
[ WHERE condition ]
[ GROUP BY grouping_element [, ...] ]
[ HAVING condition [, ...] ]
[ WINDOW window_name AS ( window_definition ) [, ...] ]
[ { UNION | INTERSECT | EXCEPT } [ ALL | DISTINCT ] select ]
[ ORDER BY expression [ ASC | DESC | USING operator ] [ NULLS { FIRST | LAST } ] [, ...] ]
[ LIMIT { count | ALL } ]
[ OFFSET start [ ROW | ROWS ] ]
[ FETCH { FIRST | NEXT } [ count ] { ROW | ROWS } ONLY ]
[ FOR { UPDATE | NO KEY UPDATE | SHARE | KEY SHARE } [ OF table_name [, ...] ] [ NOWAIT | SKIP LOCKED ] [...] ]
where from_item can be one of:
[ ONLY ] table_name [ * ] [ [ AS ] alias [ ( column_alias [, ...] ) ] ]
[ TABLESAMPLE sampling_method ( argument [, ...] ) [ REPEATABLE ( seed ) ] ]
[ LATERAL ] ( select ) [ AS ] alias [ ( column_alias [, ...] ) ]
with_query_name [ [ AS ] alias [ ( column_alias [, ...] ) ] ]
[ LATERAL ] function_name ( [ argument [, ...] ] )
[ WITH ORDINALITY ] [ [ AS ] alias [ ( column_alias [, ...] ) ] ]
[ LATERAL ] function_name ( [ argument [, ...] ] ) [ AS ] alias ( column_definition [, ...] )
[ LATERAL ] function_name ( [ argument [, ...] ] ) AS ( column_definition [, ...] )
[ LATERAL ] ROWS FROM( function_name ( [ argument [, ...] ] ) [ AS ( column_definition [, ...] ) ] [, ...] )
[ WITH ORDINALITY ] [ [ AS ] alias [ ( column_alias [, ...] ) ] ]
from_item [ NATURAL ] join_type from_item [ ON join_condition | USING ( join_column [, ...] ) ]
and grouping_element can be one of:
( )
expression
( expression [, ...] )
ROLLUP ( { expression | ( expression [, ...] ) } [, ...] )
CUBE ( { expression | ( expression [, ...] ) } [, ...] )
GROUPING SETS ( grouping_element [, ...] )
and with_query is:
with_query_name [ ( column_name [, ...] ) ] AS ( select | values | insert | update | delete )
TABLE [ ONLY ] table_name [ * ]
<SELECT statement> ::=
[ WITH { [ XMLNAMESPACES ,] [ <common_table_expression> [,...n] ] } ]
<query_expression>
[ ORDER BY { order_by_expression | column_position [ ASC | DESC ] }
[ ,...n ] ]
[ <FOR Clause>]
[ OPTION ( <query_hint> [ ,...n ] ) ]
<query_expression> ::=
{ <query_specification> | ( <query_expression> ) }
[ { UNION [ ALL ] | EXCEPT | INTERSECT }
<query_specification> | ( <query_expression> ) [...n ] ]
<query_specification> ::=
SELECT [ ALL | DISTINCT ]
[TOP ( expression ) [PERCENT] [ WITH TIES ] ]
< select_list >
[ INTO new_table ]
[ FROM { <table_source> } [ ,...n ] ]
[ WHERE <search_condition> ]
[ <GROUP BY> ]
[ HAVING < search_condition > ]
Chart for Data Science
-- Change first word "SELECT" to "LINE-SELECT"
SELECT LINE-SELECT
-- labels - first column
-- values - all columns 2..N
-- color column key - "_c": name_cFF00FF (HEX6)
-- Example :
LINE-SELECT name as label, cos(id) as cos_c1ab394, sin(id) as sin_cFF0000 FROM demo;
-- Example :
AREA-SELECT id as x, id as y FROM demo;
-- Example :
BAR-SELECT name as label, id as y FROM demo;
-- Example :
PIE-SELECT name as label, id as y FROM demo;
History
- Update history
02.2025
- SQLite add OpFS
01.2025
- New design (list db: group, sort )
Add save link db in cloud
UPD 1001 micro-modifications12.2024
- for SQLite:
NEW migrating to sqlite.org/wasm (from sql.js)
UPD no 4mb query limit
ADD regexp function
ADD tooltip description for multi query
UPD 1001 micro-modifications04.2024
- new concept 3
...2024
- ADD Format number in table
11.2023
- UPD Multi share-connect
UPD 1001 micro-modifications9.2023
- NEW Auto-save TAB
3.2023
- NEW Clipboard to SQL
ADD share-connect: simple link and password
ADD SQLite enabled bigint
UPD 1001 micro-modifications2.2023
- NEW Color settings
ADD color theme "Dark"
ADD color theme "Night"11.2022
- NEW SQLite server, share connect-link
ADD show result from history
ADD copy result from history
UPD share link for: MariaDB, PostgreSQL, MS SQL10.2022
- New design
Editor/Table four position
Native scroll for table
History saves the last 10 results9.2022
- FIX iOS height
FIX iOS ContextMenu
ADD Copy all table4.2022
- UPD MariaDB server
UPD PostgreSQL server
UPD MS SQL server
ADD info from Oracle12.2021
- FIX left menu for mobile
FIX left menu scroll10.2021
- UPD left menu,
ADD multi >-< multi databases
DEL Share sqlite DB
ADD Share cloud script
UPD 1001 micro-modifications
Remove lib MetisMenu8.2021
- new concept 2
...2021
- ADD select query(text) RUN.
7.2021
- FIX xss injections,
Thanks Luis Madero
https://twitter.com/_Y000_5.2021
- Docker - SOE Mysql (0.0.6),
Docker - SOE MariaDB (0.0.6):
UPD Multi-Level Security block
UPD Use memory
ADD Time query
Docker - SQLite Server (0.0.6-3.35.4):
UPD Multi-Level Security block4.2021
- ADD Docker - SQLite Server
ADD Time query (only "soe 0.0.4+" - Docker version)
UPD Import
UPD 1001 micro-modifications3.2021
- ADD Sort left menu
ADD Search in left menu (Table, Column, Type, Index, Trigger, Procedure, Function, ..)
Example:
NameSearch
#TypeSearch
NameSearch#TypeSearch1.2021
- ADD Docker - PostgreSQL
ADD Docker - MySQL
ADD Docker - MariaDB12.2020
- UPD SQL.js
ADD JSON1 (SQL.js)
ADD FTS5 (SQL.js)11.2020
- ADD Import: MariaDB, PostgrSQL, MS SQL
UPD Intelligent-Import
UPD Cloud User Script10.2020
- ADD Hover cell
ADD SQLite 3.33.0
UPD Stealth size bar in block
UPD Left-Menu
UPD Export
UPD Import
FIX Multi-PK8.2020
- FIX Visual-UPDATE
ADD SQLite 3.32.1
ADD Save columns size5.2020
- ADD Multi-result
ADD Short CODE:
ct
sf tableName
ii tableName
us tableName
uw tableName
df tableName
dw tableName4.2020
- ADD Visual Sort column
ADD Team-Work MariaDB
ADD Team-Work MS SQL Server
UPD MultiSyntax SQL3.2020
- NEW 1001+ UX
ADD New Chart
ADD Team-Work PostgreSQL
Remove jQuery and all lib use2.2020
- ADD MS SQL Server - test
ADD Oracle - test
ADD NEW Scroll
ADD Resize box
ADD PostgreSQL - Export
ADD MariaDB - Export
ADD PostgreSQL - test
ADD Visual-Edit MariaDB
ADD Visual-Edit PostgreSQL10.2019
- ADD MariaDB - test
UPD Visual DROP COLUMN + Syntax SQL
UPD WASM default
UPD Left menu
ADD Visual DROP COLUMN + Syntax SQL
UPD MultiVersion to WASM
UPD Visual ADD COLUMN07.2019
- ADD Visual ADD COLUMN + Syntax SQL
FIX Visual RENAME
UPD Import SQL
UPD Export CSV
FIX db-save name
ADD date release
ADD Visual RENAME + Syntax SQL
UPD Left menu
UPD Import CSV
FIX Export Schema
UPD Code editor
UPD AI.Help6.2019
- UPD Left menu sql schema
FIX Visual
TEST SQLite.wasm
ADD Visual UPDATE + Syntax SQL
ADD Visual DELETE + Syntax SQL
UPD Visual INSERT + Syntax SQL5.2019
- UPD Default 3.28.0
FIX display text
ADD Chart.test4.2019
- FIX Edge
UPD Default 3.27.2
UPD 1001 micro-modifications
ADD Geo-Balancing
UPD Export JSON
ADD Menu table - Export JSON2.2019
- UPD module library
ADD Dark style
ADD Test Premium1.2019
- ADD Scroll columns
ADD Width column
ADD auto-Width columns
ADD Visual adding of ROW (INT, TEXT, BLOB)
UPD Default 3.26.012.2018
- ADD MultiVersion + 3.25.3
FIX Import CSV
UPD Default 3.25.211.2018
- ADD MultiVersion + 3.25.2
ADD MultiVersion + 3.25.0, 3.25.19.2018
- FIX "table already exists"
ADD MultiVersion
many changes8.2018
- UPD Sqlite 3.24.0
6.2018
- UPD Sqlite 3.23.1
ADD table setting col
ADD "Open row" ai.link
ADD "Open row" ai.color
FIX back5.2018
- ADD "Open row" ai.image
4.2018
- First version
Settings
-
→ "Create SQLite DB"
I recommend using the latest version of Chrome for OpFS -
- clear old(30+ day) db history
* сlose all other tabs with this site open, then refresh the page.
-
DBlClick - SELECT Table
-
Disable autocomplite
-
Disable the message about changes when the site is closed.
(will work after the next load) -
-
Hover cell
Format number
-
visible / hide
Powered by
-
3.49.1
SqLite
- is a relational database management system contained in a C programming library. -
1.5.0
Sql.js
SQLite compiled to JavaScript through Emscripten -
10
MariaDB
-
12
PostgreSQL
-
2019
MS SQL Server Express
-
4.7.0
Font-Awesome
The iconic font and CSS toolkit -
5.62.0
CodeMirror
In-browser code editor -
Toastify
-
Chart.js
-
RGB-LAB
- comparing the difference between RGB colors -
2019.+
jetBrains
The company offers an extended family of integrated development environments IDE