Answered step by step
Verified Expert Solution
Link Copied!

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

image text in transcribed

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) NO

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Big Data Fundamentals Concepts, Drivers & Techniques

Authors: Thomas Erl, Wajid Khattak, Paul Buhler

1st Edition

0134291204, 9780134291208

More Books

Students also viewed these Databases questions

Question

2. (1 point) Given AABC, tan A b b

Answered: 1 week ago

Question

define EFFECTIVE PARTICIPATION

Answered: 1 week ago