Answered step by step
Verified Expert Solution
Question
1 Approved Answer
SQL Consider the database table structure shown in the figure. (a) Write a SELECT statement statement (compatible with an Oracle RDBMS) that returns one column
SQL
Consider the database table structure shown in the figure. (a) Write a SELECT statement statement (compatible with an Oracle RDBMS) that returns one column from the vendors table named full_name. Create this result column from the vendor_contact_first_name and vendor_contact_last_name columns, and format it like this: last name - comma space - first name (for example, "Doe, John"). Next, add code words to this statement so that the result set would be sorted by last name and then first name. In addition, add code words so that the result set is filtered for contacts whose last name begins with the letter A or E. (b) Then write two 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. in AP * E VENDORS Columns Data Iconstraints Grants Statistics |Triggers Flashback Dependencies Details Partitions indexes IsQ + 2 GR - Actions... 4 COLUMN_NAME 18 DATA_TYPE 10 NULLABLE DATA_DEF ALLT 4 COLUMN_ID 1 VENDOR ID NUMBER (null) 2 VENDOR_NAME VARCHAR2(50 BYTE) (null) 3 VENDOR_ADDRESS1 VARCHAR2(50 BYTE) Yes (null) 4 VENDOR ADDRESS2 VARCHAR2(50 BYTE) Yes (null) 41 S VENDOR CITY VARCHAR2(50 BYTE) 6 VENDOR STATE CHAR(2 BYTE) 7 VENDOR_ZIP_CODE VARCHAR2(20 BYTE) 74 8 VENDOR PHONE VARCHAR2(50 BYTE) Yes (null) 9 VENDOR_CONTACT_LAST_NAME VARCHAR2(50 BYTE) Yes (null) 10 VENDOR_CONTACT_FIRST_NAME VARCHAR2(50 BYTE) Yes (null) 101 11 DEFAULT_TERMS_ID NUMBER No (null) 11 12 DEFAULT_ACCOUNT_NUMBER NUMBER (null) (null) (null) (null) NOStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started