sql增删改查

https://blog.csdn.net/Zhangxichao100/article/details/55099118

1 增

1 insert

insert into table (姓名,性别,出生日期) values (‘王伟华’,’男’,’1983/6/15’)

insert into table (‘姓名’,’地址’,’电子邮件’)select name,address,email from Strdents

2 SELECT INTO

1
2
3
SELECT column_name
INTO newtable
FROM table1;

2 删

1 delete

删除数据某些数据

delete from table where name=’王伟华’

2 truncate

删除整个表的数据

truncate table addressList

3 改

1 update

update table set 年龄=18 where 姓名=’王伟华’

4 查

1 select

Author

Lavine Hu

Posted on

2022-04-02

Updated on

2024-04-17

Licensed under

# Related Post
  1.建表
  2.sql,hql区别
  3.sql常见操作
  4.优化
  5.函数
  6.sql
Comments

:D 一言句子获取中...