Chinaunix首页 | 论坛 | 博客
  • 博客访问: 123035
  • 博文数量: 39
  • 博客积分: 2011
  • 博客等级: 大尉
  • 技术积分: 550
  • 用 户 组: 普通用户
  • 注册时间: 2008-09-13 12:31
文章分类

全部博文(39)

文章存档

2009年(1)

2008年(38)

我的朋友

分类: 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 {条件}

阅读(641) | 评论(0) | 转发(0) |
0

上一篇:没有了

下一篇:批處理基礎

给主人留下些什么吧!~~