SQL AND and OR Operators:-
The AND Operator displays a record if both the first condition and the second condition are true.
The OR operators display a record if either the first condition or the second condition is true.
For example:-
SELECT*FROM Customers
WHERE Country ='INDIA'
AND City ='MUMBAI' ;
For example:-
SELECT*FROM Customers
WHERE City ='MUMBAI'
OR City ='RANCHI' ;
COMBINING AND & OR :-
Example:
SELECT* FROM CUSTOMS
WHERE Country ='INDIA'
AND(City ='INDIA' or City ='BERLIN');
The SQL Update Satatement:-
The Upload statment is used to update existing records in table.
Syntax:-
update table-name
set column1=value1, column2=value2,.....,
Where Some-column =some-value;
NOTE:- The Where clause in the Sql Update statment !
There Where clause specifies which record or records that should be uplaod, the where clause, all records will be updated !
For example:-
update customers
set contact name ='A.Rahman',
city ='Mumbai',
where Customer name='A.Rahman';
Comments