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

Yaml Ain’t a Markup Language

My 5 Year Machine Learning Journey

Object Oriented Design Principles Cheat Sheet — II

Understanding the OS boot process

How much should we do software testing?

To Index or Iterate

What Is Structural Code Coverage?

Visualizing ammo count in screen in form of current and max

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

Detailed Look at an ETL Conductor Workflow | Orkes Conductor Documentation

CS373 Spring: Dillon Samra

OPENSHIFT/K8S: Enable HTPasswd Authentication for your Openshift Cluster

How to Backup Docker Containered Mongo DB with Mongodump and Mongorestore