= | != | < | > | <= | >= |
---|
TYPE | LENGTH(Byte) |
---|---|
int整型 | 4 |
string字符串型 | 1~MAXLEN |
float浮点型 | 4 |
On Windows, install MinGW
first. Then use
mingw32-make clean
mingw32-make all
On Linux, use
sudo make clean && sudo make all
Use ./wsql
(On Linux) or .\wsql.exe
(On Windows) to start WSQL.
Each sentence should be ended with ";".
This will list all databases.
A new database will be created. Example:
WSQL > create database dbtest;
dbtest
PATH: ./
------------SUCCESS-------------
WSQL >
Given database will be deleted. Example:
WSQL > drop database dbtest;
------------SUCCESS-------------
WSQL >
This will enter an existing database. Example:
WSQL > use db2;
WSQL@db2 >
This will list all tables in a database. Example:
WSQL@db2 > list tables;
#==================================#
| Table |
+----------------------------------+
| tb1 |
#==================================#
------------SUCCESS-------------
WSQL@db2 >
This will show the details of given table. Example:
WSQL@db2 > detail table tb1;
tb1
--------------------------------------
NAME TYPE LENGTH(Byte)
--------------------------------------
age INT 4
name STRING 10
--------------------------------------
------------SUCCESS-------------
A new empty table will be created in database. Example:
WSQL@db2 > create table tbtest (id INT, height FLOAT, name STRING[12]);
------------------------------------------
CREATING TABLE tbtest
------------------------------------------
./db2/tbtest.scm
./db2/tbtest.id.data
./db2/tbtest.id.index
./db2/tbtest.height.data
./db2/tbtest.height.index
./db2/tbtest.name.data
./db2/tbtest.name.index
------------SUCCESS-------------
WSQL@db2 >
Given table will be deleted. Example:
WSQL@db2 > drop table tbtest;
------------------------------------------
DROPING TABLE tbtest
------------------------------------------
------------SUCCESS-------------
WSQL@db2 >
Example:
WSQL@db2 > list tables;
#==================================#
| Table |
+----------------------------------+
| tb1 |
#==================================#
------------SUCCESS-------------
WSQL@db2 > rename table tb1 tbxxx;
------------SUCCESS-------------
WSQL@db2 > list tables;
#==================================#
| Table |
+----------------------------------+
| tbxxx |
#==================================#
------------SUCCESS-------------
WSQL@db2 >
update <table name> (<column name 1>,<column name 2>,...>):(<new value 1>, <new value 2>,...) where <where-condition>
- Lastest updated on 5th,March,2021