Upcoming SlideShare
×

Operators

127
-1

Published on

0 Likes
Statistics
Notes
• Full Name
Comment goes here.

Are you sure you want to Yes No
• Be the first to comment

• Be the first to like this

Views
Total Views
127
On Slideshare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
1
0
Likes
0
Embeds 0
No embeds

No notes for slide

Operators

1. 1. 1 A Study on Operators A Mini Project Report in ITLAB Submitted to JNTU, Kakinada in Partial Fulfilment for the Award of the Degree of MASTER OF BUSINESS ADMINISTRATION Submitted By K. Swapna (Reg. No. 13491E0012). DEPARTMENT OF MASTER OF BUSINESS ADMINISTRATION QIS COLLEGE OF ENGINEERING & TECHNOLOGY An ISO 9001: 2008 Certified Institution and Accredited by NBA (Affiliated to JNTU, Kakinada and Approved by AICTE) Vengamukkapalem, Pondur Road ONGOLE –523 272.
2. 2. 2 OPERATORS Definition: SQL supports a number of operators to perform operators on date tabled in a table. These are “three” types 1. Arithmetic operators 2. Relational operators 3. Logical operators 1. Arithmetic operators: SQL supports all the basics arithmetic operators. They generally perform on column values of a table with ‘select clause’. The arithmetic operators are ADDITION (+): This is used to add the values of two or more columns. Syntax: select < col1+col2+col3+...........> from < table name >; SUBSTRACTION (-): This is used to subtract the values of column from another column. Syntax: select < col1-col2-col3......> from < table name>; MULTIPLICATION (*): Thus is used to multiply he values of two or more columns. Syntax: select < col1*col2*col3*.........> from < table name>; DIVISION (/): This is used to divided the values of column from another name Syntax: select < col1/col2/.......> from < table name>; RELATIONAL OPERATORS: Relational operators are generally used to compare two values specified by a command. The relational operators are given below. EQUAL TO: This operators is used with ‘where’ clause. It selects all the selected rows from one or more tables. If the required values is equal to the existing values. Syntax: select< columns> from < table name> where column1=column2;
3. 3. 3 LESS THAN: It selects the selected rows from one or more tables if the given values are less than existing values. Syntax: select< columns> from < table name> where col1< col2; LESSTHAN OR EQUALTO: It selects all the selected rows from one or more tables. If the values is less than or equal to the existing value Syntax: select < column> from < table name > where col1<=col2; GREATERTHAN: It selects all the selected rows from one or more tables. If the given values is greater than or equal to existing values Syntax: select < column > from < table name > where col1>= col2; LOGICAL OPERATORS: Logical operators are used to check the multiple conditions in the query SQL supports the following operators AND: This operator is used between two conditions. If the given conditions are true then it always the outputs Syntax: select < columns> from < table name > where< condition1> and < condition2> and ......; OR: This operator is used between the conditions. If any one of the given condition is true then it displays the output Syntax: Select < columns > from < tables name > where < condition1> or < condition2> or .......;
4. 4. 4