SQL > SQL プログラミング

? ?????? ? ????? ??? ?? SQL?????? ??? ?????. ?? ??? ??? ????? ?????? ??? ?? ??????.

? ???? ??? ?? ???SQL??? ???? ??? ????? ??? ??? ????. ?? Control-D ? ???? ? ???? ???(?? ???? ???)? ????? ????.

Select
SELECT "???" FROM "???";

Distinct
SELECT DISTINCT "???"
FROM "???";

Where
SELECT "???"
FROM "???"
WHERE "??";

And/Or
SELECT "???"
FROM "???"
WHERE "????"
{[AND|OR] "????"}+;

In
SELECT "???"
FROM "???"
WHERE "???" IN ('?? 1', '?? 2', ...);

Between
SELECT "???"
FROM "???"
WHERE "???" BETWEEN '?? 1' AND '?? 2';

Like
SELECT "???"
FROM "???"
WHERE "???" LIKE {??};

Order By
SELECT "???"
FROM "???"
[WHERE "??"]
ORDER BY "???" [ASC, DESC];

Count
SELECT COUNT("???")
FROM "???";

Group By
SELECT "???1", SUM("???2")
FROM "???"
GROUP BY "???1";

Having
SELECT "???1", SUM("???2")
FROM "???"
GROUP BY "???1"
HAVING (????);

Create Table
CREATE TABLE "???"
("?? 1" "?? 1 ?????",
"?? 2" "?? 2 ?????",
... );

Drop Table
DROP TABLE "???";

Truncate Table
TRUNCATE TABLE "???";

Insert Into
INSERT INTO "???" ("?? 1", "?? 2", ...)
VALUES ("?? 1", "?? 2", ...);

Update
UPDATE "???"
SET "?? 1" = [??]
WHERE "??";

Delete From
DELETE FROM "???"
WHERE "??";

?


Copyright © 2021   1keydata.com   All Rights Reserved