查询:
1)查询所有
select * from 表名
2)查询前五条数据
select * from 表名 limit 0,5 或者 select * from 表名 limit 5
查询第11条到第15条数据
select * from 表名 limit 10,5
3)返回某些属性值
select 属性名,属性名,属性名 from 表名
4)返回某条件的数据
select * from 表名 where 属性名=相应条件值 and 属性名=相应条件值
插入:
insert into 表名(字段1,字段2,字段3) values('字段1值','字段2值','字段3值')
//如果字段是字符串类型,在values中的相应值加''
否则报错,错误信息如下(当然也有可能是其他语法错误):
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '2018-6-21 9:36:54)' at line 1
修改: