ShardingSphere 4.x Sharding Use-Norms — SQL

  • 100% compatible(MySQL only, we are completing other databases).
  • Main SELECT
SELECT select_expr [, select_expr ...] FROM table_reference [, table_reference ...]
[WHERE predicates]
[GROUP BY {col_name | position} [ASC | DESC], ...]
[ORDER BY {col_name | position} [ASC | DESC], ...]
[LIMIT {[offset,] row_count | row_count OFFSET offset}]
  • select_expr
*
| [DISTINCT] COLUMN_NAME [AS] [alias]
| (MAX | MIN | SUM | AVG)(COLUMN_NAME | alias) [AS] [alias]
| COUNT(* | COLUMN_NAME | alias) [AS] [alias]
  • table_reference
tbl_name [AS] alias] [index_hint_list]
| table_reference ([INNER] | {LEFT|RIGHT} [OUTER]) JOIN table_factor [JOIN ON conditional_expr | USING (column_list)]
SELECT COUNT(*) FROM (SELECT * FROM t_order o)
SELECT COUNT(*) FROM (SELECT * FROM t_order o WHERE o.id IN (SELECT id FROM t_order WHERE status = ?))
SELECT * FROM t_order WHERE to_date(create_time, 'yyyy-mm-dd') = '2019-01-01';

--

--

--

Transform any DBMS in a distributed database system & enhance it with sharding, elastic scaling features & more. https://linktr.ee/ApacheShardingSphere

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

Method and Constructor References using streams API

3-Realistic & legit ways to make money online for beginners 2022 (Make money online)

Choosing Our Hackers for TreeHacks 2020

TryHackMe: Advent of Cyber [Day 22] If Santa, Then Christmas

LandingTrack — AdRight Integration

How to Send an SMS With Blazor

Approaches to containerization

Data Structures In A Nutshell

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Apache ShardingSphere

Apache ShardingSphere

Transform any DBMS in a distributed database system & enhance it with sharding, elastic scaling features & more. https://linktr.ee/ApacheShardingSphere

More from Medium

Builder pattern with real-life use cases

Error Handling in Kamelet Binding — By Example

Deep Dive into NoSQL Database Types