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

OCA /OCP Oracle Database 11g A ll-in-One Exam Guide- P56: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 506 Creating Cartesian Products Using Cross Joins Cartesian product is a mathematical term that refers to the set of data created by merging the rows from two or more tables together. Cross join is the syntax used to create a Cartesian product by joining multiple tables. Both terms are often used synonymously. The format of the syntax for the CROSS JOIN clause is as follows SELECT FROM tablel CROSS JOIN table2 It is important to observe that no join condition is specified using the ON or USING keyword. A Cartesian product associates the rows from tablel with every row in table2. Conditions that limit the results are permitted in the form of WHERE clause restrictions. If tablel and table2 contain x and y number of rows respectively the Cartesian product will contain x times y number of rows. The results from a cross join may be used to identify orphan rows or generate a large dataset for use in application testing. Consider the following queries Query 1 select from jobs cross join job_history Query 2 select from jobs j cross join job_history jh where id AD PRES Query 1 takes the 19 rows and 4 columns from the JOBS table and the 10 rows and 5 columns from the JOB_HISTORY table and generates one large set of 190 records with 9 columns. SQL Plus shows all instances of identically named columns as separate headings labeled with the column name unless they are aliased . SQL Developer appends an underscore and number to each shared column name and uses it as the heading. The JOB_ID column is common to both the JOBS and JOB_ HISTORY tables. The headings in SQL Developer are labeled JOB_ID and JOB_ID_1 respectively. Query 2 generates the same Cartesian product as the first but the 190 rows are constrained by the WHERE clause condition and only 10 rows are returned. Figure 12-13 shows a cross join between the REGIONS and COUNTRIES tables. There are 4 rows in REGIONS and 25 rows in COUNTRIES.

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.