首页 小组 文章 相册 留言本 用户 搜索 我的社区 在线学堂 商城 购物车 支付钱包

[分享]数据处理之增删改_01

2024-03-19 12:08:50
0
324

DESC stu_1;

INSERT INTO stu_1
VALUES (1,'张三',18,'2023-05-06');

SELECT * from stu_1;

INSERT INTO stu_1
VALUES (2,'刘能',24,'2022-06-05');

INSERT INTO stu_1
VALUES (3,'刘星',NULL,NULL);


INSERT INTO stu_1(id,name)
VALUES(4,'哈利波特');

INSERT INTO stu_1(id,name,age,date)
VALUES (5,'汪苏泷',18,'2003-10-12'),
(6,'许嵩',26,'2003-06-12'),
(7,'徐良',29,'2018-06-06');


SELECT * from stu_1;

DESC stu_2;
DESC stu_1;

SELECT * from stu_2;

INSERT INTO stu_1
SELECT * FROM stu_2

WHERE stu_id=66;

INSERT INTO stu_1(id,name)
SELECT stu_id,stu_name
from stu_2
WHERE stu_id = 68;

SELECT * from stu_1;

INSERT INTO stu_1(id,name,age,date)
SELECT stu_id,stu_name,stu_age,stu_date
FROM stu_2
WHERE stu_id like '%7%';

评论
意见反馈