TAILIEUCHUNG - Oracle SQL Jumpstart with Examples- P6

Oracle SQL Jumpstart with Examples- P6: Review "As a consultant with more than 12 years of experience working with Oracle databases on a daily basis, reviewing this book was a unique and enjoyable experience. The SQL language is without doubt one of the most critical database skills and it is best learned by example. This book addresses that crucial need. Mr. Powell does an excellent job of clarifying the concepts by using meaningful and easy to understand examples. Frankly, I have not come across any other book on SQL that is as good a compilation of SQL concepts in a single. | 220 Examining Different Types of Joins Figure Oracle Format Left Outer Join of ARTIST and GUESTAPPEARA NCE Tables. Refer back to Figure to validate artists who do not have guest appearances on any songs. You will see that these artists starting with Sheryl Crow and ending with James Taylor appear in Figure with a blank space in the SONG_ID and GUESTARTIST_ID. The query could not match any row in the GUESTAPPEARANCE table with these artists in the ARTIST table. Oracle Database 10g automatically returns a null value as a placeholder in the results for the unmatched rows. Look at the last five rows in Figure . These are the artists who do make guest appearances. Notice that the ARTIST_ID column and the GUESTARTIST_ID column contain the same number in every row. This makes sense because the query equates the values in the two columns. These rows are finding themselves in the ARTIST table. Any row in the GUESTAPPEARANCE table must match a row in the ARTIST table. The second left outer join query shown following is the ANSI version of the first left outer join query. The result is shown in Figure . One difference between the Oracle format join in Figure and the ANSI format join in Figure is the sorted order of null values. SELECT FROM ARTIST A LEFT OUTER JOIN GUESTAPPEARANCE GA ON Please purchase PDF Split-Merge on to remove this watermark. Examining Different Types of Joins 221 Figure ANSI Format Left Outer Join of the ARTIST and GUESTAPPEARA NCE Tables. The third and last left outer join query is a more complex variation of the first two using the ANSI format and the DECODE function. Note The DECODE function is an embedded case statement see Chapter 9 . The following query lists all of the artists in the ARTIST table. It returns one of two phrases depending on whether the artist makes a guest appearance on a song or not.

Đã 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.