MySQL Questions?


Write a SELECT statement that returns three columns from the Vendors table: vendor_name, vendor_contact_last_name, and vendor_contact_first_name.

How do I do this? List Steps please

MySQL QuestionsWrite a SELECT statement that returns three columns from the Vendors table vendorname vendorcontactlastname and vendorcontactfirstnameHow do I do class=

Respuesta :

Answer:

The Statement for selecting values from the table in SQL is given below,

SELECT vendor_name, vendor_contact_last_name, vendor_contact_first_name FROM Vendors;

Explanation:

SQL stands for Structured query language which is used to insert, update, delete and modify the value in a table.

There are five types of SQL-

1. Data definition language  

2. Data manipulation language

3. Data control language

4. Transaction Control Language

5. Data Query Language

The SELECT statement comes under DDL which is used to select and display values from a table.

We can use select statement in two ways-

1. SELECT column_name1, column_name2 ........column_nameN FROM Table_name;

2. SELECT * FROM tablename; ( This is used to select all values from the table name)

We can also give conditions using WHERE clause while selecting values.

Answer:

To answer this question first step is to

1. Query the table in this case vendor, so we use the SELECT statement to bring out data from a table.

SELECT vendor_name, vendor_contact_last_name, vendor_contact_first_name FROM Vendors

Explanation:

The FROM statement allows you to choose which table you want to access the selected columns. Also the columns will be comma separated so it knows that we are selecting different columns.

Otras preguntas