当前位置:Gxlcms > 数据库问题 > mysql基础_操作文件中的内容

mysql基础_操作文件中的内容

时间:2021-07-01 10:21:17 帮助过:39人阅读

1.插入数据:

  insert into t1(id,name) values(1,‘alex‘);

  #向t1表中插入id为1,name为‘alex‘的一条数据

2.删除:

  delete from t1 where id<6;

  #删除t1表中id<6的数据

3.修改:

  update t1 set age=18;

  #把t1表中数据的age字段全部改成18

  update t1 set age=18 where age=17;

  #把t1表中的age=17的全部字段改成18

4.查看数据:

  select * from t1;

  #查看t1表中的全部数据

mysql基础_操作文件中的内容

标签:基础   插入   update   rom   int   mysql基础   delete   val   sel   

人气教程排行