kingwow分布式数据库 sql使用手册
上海丛云信息科技有限公司 [2]
目录
1. 编写目的 .......................................................................................................................................................5
2. 读者对象 .......................................................................................................................................................5
3. 基本的数据库对象 .....................................................................................................................................5
4. sql基础 ......................................................................................................................................................5
4.1. 数据类型 ............................................................................................................................ 6
4.2. 函数 ...................................................................................................................................... 7
4.2.1. 系统函数 ............................................................................................................................ 7
4.2.2. 聚集函数 .......................................................................................................................... 17
4.3. 运算符 ............................................................................................................................... 19
4.4. 转义字符 .......................................................................................................................... 21
5. sql语法 ................................................................................................................................................... 21
5.1. 数据定义语句 ................................................................................................................. 21
5.1.1. create database ................................................................................................ 21
5.1.2. drop database ...................................................................................................... 22
5.1.3. create table .......................................................................................................... 22
5.1.4. alter table .............................................................................................................. 24
5.1.5. drop table ................................................................................................................ 25
5.1.6. create view ............................................................................................................. 25
5.1.7. create index ........................................................................................................... 26
5.1.8. drop index ................................................................................................................ 27
5.1.9. truncate table .................................................................................................... 27
5.1.10. create sequence ...................................................................................... 28
5.1.11. alter sequence .......................................................................................... 30
5.1.12. drop sequence ............................................................................................ 31
5.2. 数据操作语句 ................................................................................................................. 31
5.2.1. insert ............................................................................................................................ 31
5.2.2. replace ....................................................................................................................... 32
5.2.3. update .......................................................................................................................... 33
5.2.4. delete ........................................................................................................................... 33
5.2.5. select ........................................................................................................................... 34
评论