5/29/2023 0 Comments Royalts with azure databaseHere's the statementthat creates the view (unlike the oaklanders view, this one inherits columnnames from the SELECT clause): SQL create view booksas select titles.title_id, au_ord, au_lname, au_fname from authors, titles, titleauthors where _id = _id and titles.title_id = titleauthors.title_id ![]() Creating a view called books that is based on this SELECT statement wouldfacilitate the use of this particular set of data. Quite a bit of knowledge of the database is required,too. This query involves a lot of typing, and there are any number of places wherean error might slip in. Without a view, aquery something like the following might be used: SQL select titles.title_id, au_ord, au_lname, au_fnamefrom authors, titles, titleauthorswhere _id = _id and titles.title_id = titleauthors.title_id Prices, sales, advances, royalties, and personal addressesare not of interest, but the promotion manager does need some information fromeach of the three tables: titles, authors, and titleauthors. Let's say that the promotion manager needs to knowwhich authors are connected to which books and who has first, second, and thirdbilling on the cover. ![]() To clarify the advantages of using views, consider several possible users ofthe bookbiz database. Practical SQL Handbook, The: Using SQL Variants, 4th Edition
0 Comments
Leave a Reply. |