SQL Operators
SQL operators can be classified as follows.
- Arithmetic Operators
- Comparison Operators
- Logical Operators
- Set Operators
Arithmetic Operators :
| Operator | Meaning |
| + | Addition |
| - | Subtraction |
| * | Multiplication |
| / | Division |
Comparison Operators :
| Operator | Meaning |
| = | Equality |
| > | Greater than |
| < | Less than |
| >= | Greater than or equal to |
| <= | Less than or equal to |
| != | Not equal to |
| in | Compares a value to each value in list |
| any | Compares a value to each value in list |
| Between x and y | Greater than or equal to x and Less than or equal to y |
| Like | used for pattern matching |
| is null | Comparing a value is null |
Logical Operators :
| Operator | Meaning |
| and | returns true if both conditions are true. otherwise returns false |
| or | returns false if both conditions are false. otherwise returns true |
| not | returns true if condition is false. returns false if condition is true. |
SET Operators :
| Operator | Meaning |
| union | return all distinct rows which are from either query |
| union all | return all rows(duplicate also) which are from either query |
| intersect | return all distinct rows which are from both queries |
| minus | return all distinct rows which are from first query not from the second |
| Naveenkumar is a web programmer and developer of the blog: www.naveenideas.blogspot.in . He has more than 3 years teaching experience in engineering college. He has been blogging for more than 4 years. His research interests are web programming, SEO, Image Processing. |
No comments:
Post a Comment