5. ClustrixDB SQL语法
CustrixDB支持的DML语法
SELECT, DISTINCT, [LEFT | RIGHT | OUTER] JOIN, STRAIGHT_JOIN UNION, HAVING, GROUP BY, LIMIT, ASC, DESC, ORDER BY, FOR UPDATE Subqueries, including with IN EXISTS, NOT EXISTS INSERT, INSERT... ON DUPLICATE KEY UPDATE, UPDATE, DELETE, REPLACE INTO CREATE, DROP, TRUNCATE, AUTO_INCREMENT LOAD DATA INFILE START TRANSACTION, COMMIT, ROLLBACK, PREPARE COUNT(), AVG(), STD(), SUM(), MAX(), MIN(), GROUP_CONCAT()
还支持
Foreign Keys Data Types EXPLAIN Partitioned Tables (RANGE only) MySQL Replication Stored Routines Triggers
ClustrixDB不支持的DML语句
ASC or DESC qualifier for GROUP BY; instead, for ordered output, ORDER BY must be explicit. For example: select a,count(*) from foo group by 1 desc; -- will give a syntax error select a,count(*) from foo group by 1 order by desc; -- OK COLLATE in SELECT CUBE EXCEPT IGNORE keyword as part of a DELETE statement INTERSECT LOCK TABLES statement NOT in conjunction with user-defined variables that reference a function, e.g. SET @a = not foo(); ROLLUP SELECT INTO ... OUTFILE option. Use mysql -e "SELECT ..." > file_name instead. Subqueries with ALL or SOME
导出数据:
clxm@p2cn1uclx101m_10.248.100.241 ~]$ mysql -uroot -e 'select * from scloud.sbtest1 where id < 10 order by id' -N > outfile.log
导入数据:
MySQL [test]> load data infile '/home/clxm/outfile.log' into table sbtest1;
支持管理SQL语句
ANALYZE TABLE EXPLAIN and EXPLAIN REFERENCED OPTIMIZE TABLE ClustrixDB supports the syntax for OPTIMIZE TABLE, but does not perform any operation. ClustrixDB uses background processes to automatically optimize storage. REPAIR TABLE SHOW BINARY LOGS SHOW CHARACTER SET (with no WHERE clause) SHOW COLLATION SHOW COLUMNS SHOW CREATE [DATABASE | TABLE | FUNCTION | TRIGGER | SEQUENCE | VIEW] SHOW DATABASES SHOW ENGINES For compatibility, ClustrixDB lists InnoDB as part of the output of SHOW ENGINES, but the Clustrix engine will always be applied. Not all engines are listed as output of SHOW. See ENGINES for more information. SHOW GRANTS SHOW INDEX SHOW MASTER STATUS SHOW OPEN TABLES SHOW PROCESSLIST SHOW SLAVE HOSTS SHOW STATUS SHOW TABLES SHOW TRIGGER SHOW WARNINGS The syntax for SHOW WARNINGS is supported, but no warnings are ever displayed. SHOW VARIABLES
不支持的SQL管理语句
CHECKSUM TABLE FLUSH SHOW AUTHORS SHOW BINLOG EVENTS SHOW CLIENT STATISTICS SHOW COLUMNS with WHERE clauses SHOW CREATE USER SHOW CONTRIBUTORS SHOW ERRORS SHOW EVENTS SHOW EXPLAIN FOR SHOW FUNCTION [CODE | STATUS] SHOW INDEX STATISTICS SHOW LOCALES SHOW MASTER LOGS SHOW PLUGINS SHOW PRIVILEGES SHOW PROFILE SHOW PROCEDURE [CODE | STATUS] SHOW QUERY_RESPONSE_TIME SHOW TABLE_STATISTICS SHOW USER_STATISTICS
支持的函数和操作符
:=
!
!=
*
/
&
&&
%
^
+
<
<<
<=
<=>
=
=
>
>=
>>
|
||
~ ABS ACOS ADDDATE ADDTIME AES_DECRYPT AES_ENCRYPT ASCII ASIN ATAN ATAN2 AVG BETWEEN AND If one of the values being compared for BETWEEN is NULL, ClustrixDB will return NULL BIN BINARY OPERATOR BIT_AND BIT_COUNT BIT_LENGTH BIT_OR BIT_XOR CASE CAST CEIL CEILING CHAR Function CHAR_LENGTH CHARACTER_LENGTH CHARSET COALESCE COMPRESS CONCAT CONCAT_WS CONNECTION_ID CONTAINS CONV CONVERT CONVERT_TZ COS COT COUNT ClustrixDB allows multiple inputs to the COUNT() function, where some versions of MySQL and MariaDB do not ClustrixDB will include trailing NULL values in the results of COUNT(), while MySQL does not COUNT DISTINCT CRC32 CURDATE CURRENT_DATE CURRENT_ROLE CURRENT_TIME CURRENT_TIMESTAMP CURRENT_USER CURTIME DATABASE DATE FUNCTION DATE_ADD DATE_FORMAT DATE_SUB DATEDIFF DAY DAYNAME DAYOFMONTH DAYOFWEEK DAYOFYEAR DECODE DIV ELT ENCODE ENCRYPT EQUALS EXP EXPORT_SET FIELD FIND_IN_SET FLOOR FORMAT FOUND_ROWS FROM_BASE64 FROM_DAYS FROM_UNIXTIME GET_FORMAT GET_LOCK Use of GET_LOCK with Statement-based Replication is considered unsafe, though ClustrixDB does not raise an error. MySQL raises an error. GREATEST GROUP_CONCAT Multiple GROUP_CONCAT statements are supported, but only one ORDER BY is allowed per select statement HEX HOUR IF IFNULL IN INSERT Function INSTR INTERVAL IS IS NOT IS NOT NULL IS NULL IS_FREE_LOCK IS_USED_LOCK ISNULL JSON_ARRAY JSON_CONTAINS_PATH JSON_DEPTH JSON_EXTRACT JSON_KEYS JSON_LENGTH JSON_OBJECT JSON_QUOTE JSON_SEARCH JSON_TYPE JSON_UNQUOTE JSON_VALID LAST_DAY LAST_INSERT_ID LAST_VALUE LCASE LEAST LEFT LENGTH LIKE LINESTRING LN LOCALTIME LOCALTIMESTAMP LOCATE In ClustrixDB, LOCATE() returns NULL when position is provided as NULL. MySQL returns 0 in such instances. LOG LOG10 LOG2 LOWER LPAD LTRIM MAKE_SET MAKEDATE MAKETIME MAX MD5 MICROSECOND MID MIN MINUTE MOD MONTH MONTHNAME NAME_CONST NEXTVAL NOT BETWEEN NOT IN NOT LIKE NOT REGEXP NOW NULLIF OCT ORD PASSWORD PERCENT_RANK PERIOD_ADD The results of this function do not match MySQL when year boundaries are being crossed or approached. PERIOD_DIFF PI POW POWER QUARTER QUOTE RADIANS RAND Does not accept an argument as seed. RANK REGEXP RELEASE_LOCK REPEAT Function REPLACE Function REVERSE RIGHT RLIKE ROUND ROW_COUNT When updating a row, if the values are not being changed (e.g. (1,1) → (1,1)) mysql reports 0, ClustrixDB returns 1 When replacing a row with an identical row, mysql reports 1, ClustrixDB returns 2 On ClustrixDB, ROW_COUNT does not reflect the number of rows affected by a stored procedure ROW_COUNT does not match mysql behavior for DDL (e.g. CREATE TABLE then SELECT ROW_COUNT) When committing an explicit transaction, ClustrixDB reports the ROW_COUNT() value for the most recent statement before the COMMIT. In other words, row_count behaves as if there was no COMMIT. ROW_NUMBER RPAD RTRIM SCHEMA SEC_TO_TIME SECOND SESSION_USER SHA SHA1 SHA2 SIGN SIN SLEEP SQRT STD STDDEV STDDEV_POP STDDEV_SAMP STR_TO_DATE STRCMP SUBDATE SUBSTR SUBSTRING SUBSTRING_INDEX SUBTIME SUM SYSDATE Does not reflect time zone settings; always returns UTC. SYSTEM_USER TAN TIME function TIME_FORMAT TIME_TO_SEC TIMEDIFF TIMESTAMP FUNCTION TIMESTAMPADD TIMESTAMPDIFF TO_BASE64 TO_DAYS TO_SECONDS TRIM TRUNCATE UCASE UNCOMPRESS UNCOMPRESSED_LENGTH UNHEX UNIX_TIMESTAMP UPPER USER UTC_DATE UTC_TIME UTC_TIMESTAMP UUID UUID_SHORT VALUES or VALUE VAR_POP VAR_SAMP VARIANCE VERSION WEEK WEEKDAY WEEKOFYEAR XOR YEAR YEARWEEK
不支持的函数和操作符
ANALYSE() BENCHMARK() CHARSET() COERCIBILITY() COLLATION() CURRENT_USER() EXTRACT() GET_FORMAT() INET_ATON(), INET_NTOA(), INET6_ATON(), INET6_NTOA() IS_IPV4, IS_IPV4_COMPAT (), IS_IPV4_MAPPED (), IS_IPV6 () LOCK TABLES() LOAD_FILE() MAKEDATE() SESSION_USER() TO_SECONDS()
支持的DDL操作
ALTER CLUSTER DISTRIBUTE SLICES REPLICAS
不支持的DDL操作
ALTER TABLE...CONVERT CREATE SEQUENCE CREATE VIEW ... WITH CHECK OPTION
5. ClustrixDB SQL语法的更多相关文章
- 值得注意的ibatis动态sql语法格式
一.Ibatis常用动态sql语法,简单粗暴用一例子 <select id="iBatisSelectList" parameterClass="java.util ...
- Linq to SQL 语法查询(链接查询,子查询 & in操作 & join,分组统计等)
Linq to SQL 语法查询(链接查询,子查询 & in操作 & join,分组统计等) 子查询 描述:查询订单数超过5的顾客信息 查询句法: var 子查询 = from c i ...
- SQL 语法总结
学了一个月的java,开始有入门的感觉.这段时间接触到了java的JDBC, 发现学习这部分的内容还是要有SQL的基础,于是花费了几天时间学习了一下SQL语法,并将其总结于下. 选择数据 SELECT ...
- SQL语法和运算符(一)
一个数据库通常包含一个或多个表.每个表由一个名字标识,表包含带有数据的记录(行). 一些最重要的SQL命令(SQL对大小写不敏感): 一.SQL语法 select:从数据库中提取数据 update:更 ...
- [转]MySQL 最基本的SQL语法/语句
MySQL 最基本的SQL语法/语句,使用mysql的朋友可以参考下. DDL-数据定义语言(Create,Alter,Drop,DECLARE) DML-数据操纵语言(Select,Delete ...
- SQL语法整理
SQL是Structured Query Language的缩写,中文全名为结构化查询语言,是一种用于数据存储,查询,更新和管理的关系数据库系统. SQL语法 创建表 create table tab ...
- ORACLE分页查询SQL语法——最高效的分页
--1:无ORDER BY排序的写法.(效率最高)--(经过测试,此方法成本最低,只嵌套一层,速度最快!即使查询的数据量再大,也几乎不受影响,速度依然!) SELECT * FROM (SELECT ...
- [Android新手区] SQLite 操作详解--SQL语法
该文章完全摘自转自:北大青鸟[Android新手区] SQLite 操作详解--SQL语法 :http://home.bdqn.cn/thread-49363-1-1.html SQLite库可以解 ...
- 有没有好用的开源sql语法分析器? - 匿名用户的回答 - 知乎
有没有好用的开源sql语法分析器? - 匿名用户的回答 - 知乎 presto,hive,drill,calcite,sparksq
随机推荐
- EINT DINT ERTM DRTM EALLOW EDIS ESTOP0的理解
本文参考以下资料整理 https://wenku.baidu.com/view/6b0d6906cf84b9d528ea7a66.html http://pangqicheng123.blog.163 ...
- shell脚本判断里面的字符含义
[ -s FILE ] 如果 FILE 存在且大小不为0则为真. [ -a FILE ] 如果 FILE 存在则为真. [ -b FILE ] 如果 FILE 存在且是一个块特殊文件则为真. [ -c ...
- IDEA 双击只选择了一个变量的某部分单词
1,很多抄袭文章说 在keymap 里搜索 select Word at caret , 鄙视手动抄袭和编写爬虫来 作恶的开发者. 2,自己试了,File菜单 ----> settings- ...
- [转帖]RSA算法与DSA算法的区别
RSA算法与DSA算法的区别 https://cloud.tencent.com/developer/news/254061 文章来源:企鹅号 - SuperFullStack 本文译自:StackE ...
- 【一个蒟蒻的挣扎】LCA (倍增)
#include<cstdio> #include<iostream> #include<cstring> using namespace std; struct ...
- jquery html select 清空保留第一项
<select id="a"> <option>1</option> <option>2</option> <op ...
- Git_命令初解
- 模板 - 强连通分量 - Kosaraju
Kosaraju算法 O(n+m) vector<int> s; void dfs1(int u) { vis[u] = true; for (int v : g[u]) if (!vis ...
- [Vue] vue-router-interview
1.vue-router 怎么重定向页面? 路由中配置 redirect 属性 使用路由的别名来完成重定向 2.vue-router 怎么配置 404 页面? path: '*',放在最后一个 3.切 ...
- 关于echarts 重绘/图表切换/数据清空
容器id 为main var myChart=document.getElementById("main") myChart.removeAttribute("_echa ...