上一页 1 ··· 60 61 62 63 64 65 66 67 68 ··· 76 下一页
摘要: Applying Additional Condtions to a JoinUse the AND cluause or the WHERE clause to aplly additional condtions:AND CLAUSESQL> SELECT e.employee_id,e.last_name,d.department_id,d.department_name FROM employees e JOIN departments d ON (e.department_id = d.department_id) AND e.manager_id = 149;EMPLOYEE 阅读全文
posted @ 2013-04-15 17:23 ArcerZhang 阅读(165) 评论(0) 推荐(0) 编辑
摘要: Creating Natural JoinsThe NATURAL JOIN clause is based on all columns in the two tables that have the same name.It selects rows from the two tables that have equal values in all matched columns.If the columns having the same names have different data types,an error is returned.Retrieving Records wit 阅读全文
posted @ 2013-04-15 15:38 ArcerZhang 阅读(161) 评论(0) 推荐(0) 编辑
摘要: ObjectivesAfter completing this lesson,you should be able to do the following:Write SELECT statements to access data from more than one table using equijoins and nonequijoins.Join a table to itself by using a self-joinView data that generally does not meet a join condtions by using outer joinsGenera 阅读全文
posted @ 2013-04-15 15:37 ArcerZhang 阅读(187) 评论(0) 推荐(0) 编辑
摘要: Using the GROUP BY ClauseThe GROUP BY column does not have to be in the SELECT list.(不过这样一般意义不大)View Code SQL> SELECT AVG(salary) AvgSalary FROM employees GROUP BY department_id ORDER BY AVGSALARY; AVGSALARY----------3475.55556 4150 4400 5760 6500 70008601.333338955.88235 ... 阅读全文
posted @ 2013-04-15 12:28 ArcerZhang 阅读(208) 评论(0) 推荐(0) 编辑
摘要: ObjectivesAfter completing this lesson,you should be able to do the following:Identify the available group functionsDescribe the use of group functionsGroup data by using the GROUP BY clauseInclude or exclude grouped rows by using the HAVING clauseLesson AgendaGroups functions:-Types and syntax-Use 阅读全文
posted @ 2013-04-15 10:39 ArcerZhang 阅读(257) 评论(1) 推荐(0) 编辑
摘要: ObjectivesAfter completing this lesson,you should be able to do the following:Limit the rows that are retrieved by a query.Sort the rows that are retrieved by a query.Use ampersand substitution to restrict and sort output at run time.Lesson AgendaLimiting rows with:-The WHERE clause-The comparison c 阅读全文
posted @ 2013-04-14 18:22 ArcerZhang 阅读(832) 评论(0) 推荐(0) 编辑
摘要: ObjectiveAfter completing this lesson,you should be able to do the following:List the capabilities of SQL statements.Execute a basic SELECT statementLesson AgendaBasic SELECT statementArithmetic expressions and NULL values in the SELECT statementColumn aliasesUse of concatenation operator,literal ch 阅读全文
posted @ 2013-04-14 13:44 ArcerZhang 阅读(325) 评论(0) 推荐(0) 编辑
摘要: Realational Database Terminology1->row;2->主键列;3->普通列;4->外键列;5->普通字段值;6->普通字段null值;Using SQL to Query Your DatabaseStructured query language(SQL) is:The ANSI standard languagte for operating relational databaseEfficient,easy to learn,and useFunctionally complete(With SQL,you can def 阅读全文
posted @ 2013-04-13 18:20 ArcerZhang 阅读(646) 评论(0) 推荐(0) 编辑
摘要: ObjectivesAfter comleting this lesson,you should be able to do the following:Understant the goals of course.Discuss the theoretical and physical aspect of arelational database.Identify the development environments that can be used fo this coureDescribe the database and schema used in this course.Cou 阅读全文
posted @ 2013-04-13 16:53 ArcerZhang 阅读(256) 评论(0) 推荐(0) 编辑
摘要: Conditional ExpressionsPrvoide the use of the IF-THEN-ELSE logic within a SQL statementUse two methods-CASE expression(SQL标准)-DECODE function(专属Oracle)CASE ExpressionFacilitates conditional inquiries by doing the work of an IF-THEN-ELSE statement:CASE expr WHEN comparison_expr1 THEN return_expr1 ... 阅读全文
posted @ 2013-04-12 18:06 ArcerZhang 阅读(198) 评论(0) 推荐(0) 编辑
上一页 1 ··· 60 61 62 63 64 65 66 67 68 ··· 76 下一页