Oops! It appears that you have disabled your Javascript. In order for you to see this page as it is meant to appear, we ask that you please re-enable your Javascript!

SQL WHERE clause in database systems

What is WHERE clause?

Where clause filters the record from a table according to given condition.

RollNoNameFee
1Sameed10,000
2Shahzeb10,000
3Basit0.00

Table 1: student

Example 1 of WHERE clause

Query:

SELECT * FROM student  WHERE Name = ‘sameed’;

Note: This will display values from all the table WHERE Name is sameed.

Result:

RollNoNameFee
1Sameed10,000

Query displays the resultant table: student


Example 2 of WHERE clause

Query:

SELECT * FROM student  WHERE Fee = ‘10,000’;

Note: This will display values from all the table WHERE Fee is 10,000.

Result:

RollNoNameFee
1Sameed10,000
2Shahzeb10,000

Query displays the resultant table: student


Example 3 of WHERE clause

Query:

SELECT * FROM student  WHERE Fee <  10000;

Note: This will display values from all the table WHERE Fee is less than 10,000.

Result:

RollNoNameFee
3Basit0.00

Query displays the resultant table: student

Fazal Rehman Shamil Click Here to Know More
Instructor, Researcher, Blogger, SEO Expert, Poet and Publisher of International Journal Of Software, Technology & Science ISSN : 2616 - 5325
Dear Professors and Resarchers!You are welome to Cite these tutorials in your research or slides etc. Please don't forget to mention the reference of website. Copy Paste of text is strcitly forbidden. Images can be reuse because images are protected with watermark.

Leave a Reply

Your email address will not be published. Required fields are marked *