Posts

Showing posts from 2018

Operator in SQL

What is an Operator in SQL? An operator is a reserved word or a character used primarily in an SQL statement's WHERE clause to perform operation(s), such as comparisons and arithmetic operations. These Operators are used to specify conditions in an SQL statement and to serve as conjunctions for multiple conditions in a statement. ·          Arithmetic operators ·          Comparison operators ·          Logical operators ·          Operators used to negate conditions SQL Arithmetic Operators Assume 'variable a' holds 10 and 'variable b' holds 20, then − Operator Description Example + (Addition) Adds values on either side of the operator. a + b will give 30 - (Subtraction) Subtracts right hand operand from left hand oper...

Join

SQL JOIN SQL Join is used to fetch data from two or more tables, which is joined to appear as single set of data. It is used for combining column from two or more tables by using values common to both tables. JOIN  Keyword is used in SQL queries for joining two or more tables. Minimum required condition for joining table, is (n-1) where n, is number of tables. A table can also join to itself, which is known as, Self Join . Types of JOIN Following are the types of JOIN that we can use in SQL: ·          Inner ·          Outer ·          Left ·          Right Cross JOIN or Cartesian Product This type of JOIN returns the cartesian product of rows from the tables in Join. It will return a table which consists of records which combines each row from the first table with each ro...