207k views
2 votes
Create and execute a SELECT statement that would provide data for a vendor directory. Display should include vendor number, vendor name, street, city, state, zip code. Concatenate the address elements to look like ‘1234 Main Street State College, PA 16802’. Override the column labels with meaningful descriptions. Directory display should be sorted by vendor name ascending.

1 Answer

4 votes

Answer:

SELECT vendor_number, vendor_name, CONCAT ('street', ' ' , 'city', ' ' , 'state', ' ' , 'zip code') as adress

FROM vendor_directory

ORDER BY vendor_name ASC;

Step-by-step explanation:

* Suppose vendor_directory is the name of the table from which you extract the data with the SELECT sentence.

User Anubhab
by
5.8k points