Logical Operators - OR Operator

The Oracle engine will process all rows in a table and display the result only when any of the conditions specified using the OR operator are satisfied.

Ex: Retrieve client information like client_no,address1,address2,city and pincode for all the clients where the field pincode has the value 400065 or 500089;

SELECT client_no,name,address1,address2,city,pincode From client_master WHERE (pincode=400065 OR picode=500089);

The contents of the fields client_no,name,address1,address2,city,pincode satisfying the condition of pincode being 400065 OR 500089 in the client_master table will be displayed on the screen.
Share/Bookmark

No comments: