SQL Consider the database table structure shown in the figure. (a) Write a SELEC
ID: 3730400 • Letter: S
Question
SQL
Consider the database table structure shown in the figure. (a) Write a SELECT statement (compatible with an Oracle RDBMS) that returns three columns from the vendors table: vendor_name, vendor_ contact last_name, and vendor_contact_first_name. Write the query so that each database column is aliased in the result set as a similar column name that uses spaces instead of underscores. (b) Then write two result dataset rows of sample data that might be retrieved by the query. What is actually retrieved depends on what is in the table. The data you write does not have to match any data that is actually in our sample tables. Columns Data Constraints Grants IStatistics Triggers Flashback IDependencies Details Partitions Indexes IsQu DATA TYPE NUMBER VARCHAR2(50 BYTE) VARCHAR2(50 BYTE) VARCHAR2(50 BYTE VARCHAR2(50 BYTE) CHAR(2 BYTE VARCHAR2(20 BYTE VARCHAR2(50 BYTE) VARCHAR2(50 BYTE VARCHAR2(50 BYTE) NUMBER NUMBER DATA DEFAULT (nul) (null) (null) (null) (null) (null) COLLIMN NAME VENDOR ID VENDOR NAME 3 VENDOR ADDRESS1 Yes 3 ( VENDOR_ ADDRESS2 VENDORCITY 5( 60 6 VENDOR STATE VENDOR_ZIP_CODE Yes Yes Yes 8 VENDOR PHONE VENDOR CONTACT LAST_NAME (null) 9 10 VENDOR_CONTACT_FIRST_NAME 11 DEFAULT TERMS ID 12 DEFAULT_ ACCOUNT NUMBER 8 (null) (null)Explanation / Answer
SQL Query:
Select VENDOR_NAME AS "VENDOR NAME",
VENDOR_CONTACT_LAST_NAME AS "VENDOR CONTACT LAST NAME",
VENDOR_CONTACT_FIRST_NAME AS "VENDOR CONTACT FIRST NAME"
FROM VENDORS.
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.