分类: WINDOWS
2008-09-23 13:16:58
SELECT DISTINCT "栏位"
FROM "表格名"
SELECT "栏位"
FROM "表格名"
WHERE "condition"
SELECT "栏位"
FROM "表格名"
WHERE "简单条件"
{[AND|OR] "简单条件"}+
SELECT "栏位"
FROM "表格名"
WHERE "栏位" IN ('值1', '值2', ...)
SELECT "栏位"
FROM "表格名"
WHERE "栏位" BETWEEN '值1' AND '值2'
SELECT "栏位"
FROM "表格名"
WHERE "栏位" LIKE {模式}
SELECT "栏位"
FROM "表格名"
[WHERE "条件"]
ORDER BY "栏位" [ASC, DESC]
SELECT COUNT("栏位")
FROM "表格名"
SELECT "栏位1", SUM("栏位2")
FROM "表格名"
GROUP BY "栏位1"
SELECT "栏位1", SUM("栏位2")
FROM "表格名"
GROUP BY "栏位1"
HAVING (栏位)
CREATE TABLE "表格名"
("栏位 1" "栏位 1 资料种类",
"栏位 2" "栏位 2 资料种类",
... )
DROP TABLE "表格名"
TRUNCATE TABLE "表格名"
INSERT INTO "表格名" ("栏位1", "栏位2", ...)
VALUES ("值1", "值2", ...)
UPDATE "表格名"
SET "栏位1" = [新值]
WHERE {条件}
DELETE FROM "表格名"
WHERE {条件}