SQL???????????
????????????? ???????[ 2017/5/9 9:28:41 ] ????????????? SQL
????SQL ?е? SELECT ?????????????????????????е?????????????? WHERE ???????????????????????????????????С?
?????????????? WHERE ???
????????????? SELECT??INSERT??UPDATE ?? DELETE ????????á?
?????????? SELECT ???????????
SELECT id?? name
FROM table1
WHERE id in (
SELECT id
FROM table2);
?????????????????????У???????????????????????????? in ????????????????????????? table1 ?? table2 ?е? id ??
???????WHERE ????е?????????????????Χ????????????????????????????????????????????
?????????????????????????????? =??<??>??>=??<=??IN??BETWEEN ????????????磺
SELECT id?? name FROM table1
WHERE id = (
SELECT id
FROM table2
WHERE name = "xxx");
??????????У?
SELECT id?? name FROM table1
WHERE (name?? age) = (
SELECT name?? age
FROM table2
WHERE id = 3);
????????????????????????????? in ???????????
???????磺
SELECT email
FROM table1
WHERE id in (
SELECT id
FROM table2);
????????????????????
?????????????????????????????????????????У????磺
INSERT INTO newtable
SELECT * FROM oldtable
WHERE id > 100;
???????????????????У?
INSERT INTO newtable (id?? name)
SELECT id?? name FROM oldtable
WHERE id < 50;
????????????????????????????????????Χ??
??????
???·???
??????????????????
2023/3/23 14:23:39???д?ò??????????
2023/3/22 16:17:39????????????????????Щ??
2022/6/14 16:14:27??????????????????????????
2021/10/18 15:37:44???????????????
2021/9/17 15:19:29???·???????·
2021/9/14 15:42:25?????????????
2021/5/28 17:25:47??????APP??????????
2021/5/8 17:01:11