tailieunhanh - OCA /OCP Oracle Database 11g A ll-in-One Exam Guide- P57

OCA /OCP Oracle Database 11g A ll-in-One Exam Guide- P57:There is an ever increasing demand for staff with IT industry certification. The benefits to employers are significant—they can be certain that staff have a certain level of competence—and the benefits to the individuals, in terms of demand for their services, are equally great. Many employers are now requiring technical staff to have certifications, and many IT purchasers will not buy from firms that do not have certified staff. | OCA OCP Oracle Database 11g All-in-One Exam Guide 516 The previous chapters have dealt with the SELECT statement in considerable detail but in every case the SELECT statement has been a single self-contained command. This chapter shows how two or more SELECT commands can be combined into one statement. The first technique is the use of subqueries. A subquery is a SELECT statement whose output is used as input to another SELECT statement or indeed to a DML statement as done in Chapter 8 . The second technique is the use of set operators where the results of several SELECT commands are combined into a single result set. Define Subqueries A subquery is a query that is nested inside a SELECT INSERT UPDATE or DELETE statement or inside another subquery. A subquery can return a set of rows or just one row to its parent query. A scalar subquery returns exactly one value a single row with a single column. Scalar subqueries can be used in most places in a SQL statement where you could use an expression or a literal value. The places in a query where a subquery may be used are In the SELECT list used for column projection In the FROM clause In the WHERE clause In the HAVING clause A subquery is often referred to as an inner query and the statement within which it occurs is then called the outer query. There is nothing wrong with this terminology except that it may imply that you can only have two levels inner and outer. In fact the Oracle implementation of subqueries does not impose any practical limits on the level of nesting the depth of nesting permitted in the FROM clause of a statement is unlimited and that in the WHERE clause is up to 255. EXAM TIP Subqueries can be nested to an unlimited depth in a FROM clause but to only 255 levels in a WHERE clause. They can be used in the SELECT list and in the FROM WHERE and HAVING clauses of a query. A subquery can have any of the usual clauses for selection and projection. The following are required clauses A SELECT list A FROM

TỪ KHÓA LIÊN QUAN
crossorigin="anonymous">
Đã phát hiện trình chặn quảng cáo AdBlock
Trang web này phụ thuộc vào doanh thu từ số lần hiển thị quảng cáo để tồn tại. Vui lòng tắt trình chặn quảng cáo của bạn hoặc tạm dừng tính năng chặn quảng cáo cho trang web này.