查询

基础

SELECT `fileID` FROM `task` WHERE `id`= 1

内范围查询 多条件查询

// 并排序
SELECT * FROM `update` WHERE `nowstate`=2 AND `note` is NOT NULL AND (`time` > 1) AND (`time` < 10) order by `time` desc

查询完成重命名字段名 as

SELECT `id`,`fileID`,`note`,from_unixtime(`createTime`) as createTime FROM `task` WHERE `updataType`=2  ORDER BY `createTime` DESC

添加

INSERT INTO `task` (`fileID`,`note`,`createTime`,`字段`) VALUES ('值', '值', '值',1)

修改

UPDATE `update` SET `nowstate`=2 WHERE (`id`=1)

删除

DELETE FROM `表名称` WHERE `列名称` = 值
07-12 02:20