tailieunhanh - SQL VISUAL QUICKSTART GUIDE- P42

SQL VISUAL QUICKSTART GUIDE- P42:SQL (pronounced es-kyoo-el) is the standard programming language for creating, updating, and retrieving information that is stored in databases. With SQL, you can turn your ordinary questions (“Where do our customers live?”) into statements that your database system can understand (SELECT DISTINCT city, state FROM customers;) | Chapter 13 Creating a View with CREATE VIEW When you run a CREATE VIEW statement in Microsoft Access the view appears as a query object in the Database window. To run Listing change every occurrence of II to see the DBMS Tip in Concatenating Strings with II in Chapter 5. To run Listing type CREATE VIEW au_titles LastName Title AS SELECT FROM au_names an INNER JOIN titles t INNER JOIN title_authors ta ON ON WHERE IN A02 A05 To run Listings through in Microsoft SQL Server remove the terminating semicolon from each statement. Additionally to run Listing change every occurrence of II to and every occurrence of TRIM x to LTRIM RTRIM x see the DBMS Tips in Concatenating Strings with II and Trimming Characters with TRIM in Chapter 5. To run Listings and in Oracle 8i and earlier use WHERE syntax instead of JOIN syntax. Type Listing CREATE VIEW cities au_id au_city pub_id pub_city AS SELECT FROM authors a publishers p WHERE and Listing CREATE VIEW au_titles LastName Title AS SELECT FROM title_authors ta au_names an titles t WHERE AND AND in A02 A05 To run Listing in DB2 change every occurrence of TRIM x to LTRIM RTRIM x see the DBMS Tip in Trimming Characters with TRIM in Chapter 5. To run Listing in MySQL use the function CONCAT instead of the concatenation operator II see the DBMS Tips in Concatenating Strings with II in Chapter 5. MySQL and later support views. Earlier versions won t run the listings in this section. To hide data in earlier versions use MySQL s privilege system to restrict column access. In Microsoft SQL Server Oracle DB2 MySQL and PostgreSQL you can add the optional clause WITH CASCADED I LOCAL CHECK OPTION when you create a view. This clause applies to only updateable views and ensures that only data .

TỪ KHÓA LIÊN QUAN