v1.10

Document

How to Start SequoiaDB

Basic Operation

Data Model

Database Management

Aggregation

Index

Replication

Cluster

Connector

Reference

Development

Release Note

FAQ

  • Content
  • Comments
  • History

SQL Grammer

Sequoiadb is a document-oriented type of non-relational database, this section mainly descibes how to use SQL to access and process data in the Sequoiadb system.

Note: in the sequoiaDB,SQL statement is not case sensitive.

SQL grammar table

statement description samples
create collectionspace create collectionspace db.execUpdate("create collectionspace foo")
drop collectionspace drop collectionspace db.execUpdate("drop collectionspace foo")
create collection create collection db.execUpdate("create collection foo.bar")
drop collection drop collection db.execUpdate("drop collection foo.bar")
create index create index db.execUpdate("create index test_index on foo.bar (age)")
drop index drop index db.execUpdate("drop index test_index on foo.bar")
list collectionspaces list collectionspace db.exec("list collectionspaces")
list collections list collection db.exec("list collections")
insert into insert db.execUpdate("insert into foo.bar(age,name) values(20,"Tom")")
select from query db.exec("select * from foo.bar")
update set update db.execUpdate("update foo.bar set age=25")
delete from delete db.execUpdate("delete from foo.bar")
group by group db.exec("select dept_no,count(emp_no) as Number of employees from foo.bar group by dept_no ")
order by sort db.exec("select * from foo.bar order by age desc")
split by records split
limit limit the number of return records db.exec("select * from foo.bar limit 5")
offset set the number of records skipped db.exec("select * from foo.bar offset 5")
as aliases
join on join
left outer join on left join
right outer join on right join
count count
sum sum
avg average
max max
min min
first select the first data
last select the last one data
push combinde array
addtoset no duplicate values in the array merge
buildobj merging objects
mergearrayset merger does not contain duplicate array of fields
please login to comment.
Latest Comment
  • 2015-02-15

About Us

SequoiaDB is a financial-level distributed database vendor and is the first Chinese database listed in Gartner’s Magic Quadrant OPDBMS report. SequoiaDB has recently released version 3.0.
SequoiaDB is now penetrating the vertical sector Financial Industry quickly and had more than 50 banking clients and hundreds of enterprise customers in industries including government, telecommunication, Internet and IoT.

Beijing:
Tower R, No.8 North Star East Road, Chaoyang District, Beijing,China
Guangzhou:
Tower A, No.22 Qinglan Street, Panyu District, Guangzhou,China
Shenzhen:
Tsing Hua Tech Park, Nanshan District, Shenzhen,China
Tel:400-8038-339
E-mail:contact@sequoiadb.com