SQL教程.pdf - SQL 21(V1.0 1 14 16 16 SQL 17 SQL 17.

Info icon This preview shows pages 1–6. Sign up to view the full content.

SQL 21 日自学通 (V1.0) 翻译人 笨猪 EMAIL [email protected] 1 目录 目录 .......................................................................................................................................... 1 译者的话 ............................................................................................................................. 14 第一周概貌 ............................................................................................................................. 16 从这里开始 ............................................................................................................. 16 第一天 SQL 简介 .................................................................................................................. 17 SQL 简史 ................................................................................................................ 17 数据库简史 ............................................................................................................. 17 设计数据库的结构 ................................................................................................... 21 SQL 总览 ......................................................................................................... 23 流行的 SQL 开发工具 ....................................................................................... 24 SQL 在编程中的应用 ........................................................................................ 27 第二天 查询 ——SELECT 语句的使用 ................................................................................... 30 目标 .................................................................................................................... 30 背景 ................................................................................................................. 30 一般的语法规则 ............................................................................................... 30 你的第一个查询 ............................................................................................... 33 总结 .................................................................................................................... 37 问与答 ................................................................................................................. 38 校练场 .................................................................................................................... 38 练习 .................................................................................................................... 39 第三天 表达式 条件语句与运算 .......................................................................................... 40 第四天 函数 对数据的进一步处理 ....................................................................................... 60 目标 .................................................................................................................... 60 汇总函数 ................................................................................................................. 60 COUNT ............................................................................................................ 61 SUM ................................................................................................................ 61 AVG ................................................................................................................. 63 MAX ................................................................................................................ 63 MIN ................................................................................................................. 64 VARIANCE ...................................................................................................... 65 STDDEV .......................................................................................................... 66
Image of page 1

Info icon This preview has intentionally blurred sections. Sign up to view the full version.

SQL 21 日自学通 (V1.0) 翻译人 笨猪 EMAIL [email protected] 2 日期 / 时间函数 ......................................................................................................... 66 ADD_MONTHS ................................................................................................ 67 LAST_DAY ...................................................................................................... 68 MONTHS_BETWEEN ....................................................................................... 69 NEW_TIME ...................................................................................................... 70 NEXT_DAY ...................................................................................................... 71 SYSDATE ......................................................................................................... 72 数学函数 ................................................................................................................. 72 ABS ................................................................................................................. 73 CEIL FLOOR ............................................................................................... 73 COS COSH SIN SINH TAN TANH ........................................................ 73 EXP ................................................................................................................. 75 LN and LOG ..................................................................................................... 75 MOD ................................................................................................................ 76 POWER ............................................................................................................ 77 SIGN ............................................................................................................... 77 SQRT ............................................................................................................... 78 字符函数 ................................................................................................................. 79 CHR ................................................................................................................. 79 CONCAT .......................................................................................................... 79 INITCAP .......................................................................................................... 80 LOWER UPPER ........................................................................................... 81 LPAD RPAD ................................................................................................. 82 LTRIM RTRIM ............................................................................................. 83 REPLACE ........................................................................................................ 84 SUBSTR ........................................................................................................... 85 TRANSLATE .................................................................................................... 88 INSTR ............................................................................................................. 88 LENGTH .......................................................................................................... 89 转换函数 ................................................................................................................. 89 TO_CHAR ........................................................................................................ 90 TO_NUMBER ................................................................................................... 91 其它函数 ................................................................................................................. 91 GREATEST LEAST ...................................................................................... 91 USER ............................................................................................................... 92 总结 ........................................................................................................................ 92 问与答 .................................................................................................................... 93 校练场 .................................................................................................................... 93 练习 ........................................................................................................................ 94 第五天 SQL 中的子句 ........................................................................................................... 95
Image of page 2