w3resource
SQL exercises

SQL: Select specified columns with where clause

SQL Basic Select Statement : Exercise-9 with Solution.

Write a query to display names and city of salesman, who belongs to the city of Paris. 

Sample table: salesman


Sample Solution :

SELECT name,city
FROM salesman
WHERE city='Paris';

Output of the Query:

name		city
Nail Knite	Paris
Mc Lyon		Paris

Explanation :

Syntax of select specified columns with where clause

Pictorial presentation :

Result of select specified columns with where clause

Query Visualization:

Duration:

Query visualization of Select specified columns with where clause - Duration

Rows:

Query visualization of Select specified columns with where clause - Rows

Cost:

Query visualization of Select specified columns with where clause - Cost

 

Practice Online


Have another way to solve this solution? Contribute your code (and comments) through Disqus.

Previous: Write a query which will retrieve the values of salesman id of all salesmen getting orders from the customers in orders table without any repeats.
Next: Write a SQL statement to display all the information for those customers with a grade of 200.

What is the difficulty level of this exercise?



New Content: Composer: Dependency manager for PHP, R Programming