Sharp Tutorial
Where clause in select Query

Python

Java

C

C++

HTML/CSS

Java Script

PHP

SQL

C Programs

SQL

  • SQL home
  • SQL introduction
  • SQL install and Run
  • create table
  • drop table
  • alter table
  • Insert into table
  • select query
  • Where Clause
  • Order By /Group By
  • Delete Query
  • Update query
  • Aggregate Function
  • Join Tables
  • SQL Examples
  • SQL Exercise

DBMS

Where Clause

Where clause is used to 

Where Clause Syntax  : select * or (column-names)  from <table-name> where <condition>;

 
    select * from Student where course='bca'; 
 

Above query Displays records only whose course is bca.

Multiple conditions (where clause ) may be combined together either by using AND & OR .

Syntax for and: select * from <table-name> where <condition1> and <conditon2> ……..

Syntax for or: select * from <table-name> where <condition1> or <conditon2> ……..

 
    select * from Student where course ='BE' and address='delhi'; 
 

Above query display the records only whose course is BE and address is delhi.

 
    select * from Student where name ='john' or fee<=50000; 
 

Above query display the records where name is either john or fee is less than or 50000.

Where  clause may be applied on update and delete as well (we will see in next chapters).

Multiple Conditions for where clause may be applied as following

=, !=(equal to, not equal to)

<, > (less than , greater than).

 between (between a given range) etc.

Enquiry about Course

Ask your Question

Click Here

Sharp (2) Tutorials

Video/ C Introduction

Watch video in full size

Video tutorial

Follow by Email
Facebook
Facebook
fb-share-icon
YouTube
Copyright © Sharp Tutorial
Build with WordPress
Wordpress Social Share Plugin powered by Ultimatelysocial
Sharp Tutorial