数据行操作的相关SQL语句(指令)如下:

    • 数据
      1. insert into 表名 (列名,列名,列名) values(对应列的值,对应列的值,对应列的值);
      ```sql insert into tb1(name,password) values(‘mufeng’,’123123’); insert into tb1(name,password) values(‘mufeng’,’123123’),(‘alex’,’123’);

    insert into tb1 values(‘mufeng’,’123123’),(‘gini’,’123’); — 如果表中只有2列

    1. - [x] **删**除数据
    2. ```sql
    3. delete from 表名;
    4. delete from 表名 where 条件;
    1. delete from tb1;
    2. delete from tb1 where name="mufeng";
    3. delete from tb1 where name="mufeng" and password="123";
    4. delete from tb1 where id>9;
    • 数据
      1. update 表名 set 列名=值;
      2. update 表名 set 列名=值 where 条件;
      ```sql update tb1 set name=”mufeng”; update tb1 set name=”mufeng” where id=1;

    update tb1 set age=age+1; — 整型 update tb1 set age=age+1 where id=2;

    update L3 set name=concat(name,”db”); update L3 set name=concat(name,”123”) where id=2; — concat一个函数,可以拼接字符串

    1. - [x] **查**询数据
    2. ```sql
    3. select * from 表名;
    4. select 列名,列名,列名 from 表名;
    5. select 列名,列名 as 别名,列名 from 表名;
    6. select * from 表名 where 条件;
    1. select * from tb1;
    2. select id,name,age from tb1;
    3. select id,name as N,age, from tb1;
    4. select id,name as N,age, 111 from tb1;
    5. select * from tb1 where id = 1;
    6. select * from tb1 where id > 1;
    7. select * from tb1 where id != 1;
    8. select * from tb1 where name="mufeng" and password="123";