一、 建表
入门实例
1 、建表的时候指定数据类型
2、 建表的时候一定指定表引擎
使用TinyLog引擎建表
create table if not exists tb_user(
uid UInt64 ,
name String ,
age UInt8,
sal Float64 ,
gender String
) engine=TinyLog ;
–向表中插入数据
insert into tb_user values(1001,'zss',23,10000,'M'),(1002,'lss',33,20000,'F') ;
文件存储格式:
----------------
id.bin
name.bin
age.bin
sal.bin
gender.bin
--------------------
使用StripeLog引擎建表
create table if not exists tb_stripeLog(
uid UInt64 ,
name String ,
age UInt8,
sal Float64 ,
gender String
) engine=StripeLog ;
-- 插入数据
insert into tb_stripeLog values(1001,'zss',23,10000,'M'),(1002,'lss',33,20000,'F') ;
文件存储格式:
--------------
data.bin
index.mrk
sizes.json
--------------