SQL-QUERY TYPES, ALIASES, JOINS, CLAUSES, FUNCTIONS

SQL Server – QUERY TYPES, ALIASES, JOINS, CLAUSES, FUNCTIONS:



In this post we listed many type of QueryType, Aliase, sql join and function in sql database.
The Sql database provide. 



SQL Database QUERY TYPES:

  • SELECT Statement           Retrieve records from a table
  • SELECT LIMIT Statement               Retrieve records from a table and limit results
  • SELECT TOP Statement  Retrieve records from a table and limit results
  • INSERT Statement           Insert records into a table
  • UPDATE Statement         Update records in a table
  • DELETE Statement           Delete records from a table
  • UNION Operator              Combine 2 result sets (removes duplicates)
  • UNION ALL Operator      Combine 2 result sets (includes duplicates)
  • INTERSECT Operator       Intersection of 2 result sets
  • MINUS Operator              Result set of one minus the result set of another. 


SQL Database JOINS:

JOIN Database TABLES   Inner and Outer joins.

SQL Database ALIASES:


ALIASES  Create a temporary name for a column or table

SQL Database CLAUSES:

  • DISTINCT Clause               Retrieve unique records
  • FROM Clause     List tables and join information
  • WHERE Clause   Filter results
  • ORDER BY Clause              Sort query results
  • GROUP BY Clause            Group by one or more columns
  • HAVING Clause Restrict the groups of returned rows


Predefined SQL Database FUNCTIONS:

  • COUNT Function              Return the count of an expression
  • SUM Function   Return the sum of an expression
  • MIN Function    Return the min of an expression
  • MAX Function   Return the max of an expression
  • AVG Function    Return the average of an expression


SQL Database CONDITIONS:

  • AND Condition  2 or more conditions to be met
  • OR Condition     Any one of the conditions are met
  • AND & OR           Combining AND and OR conditions
  • LIKE Condition   Use wildcards in a WHERE clause
  • IN Condition       Alternative to multiple OR conditions
  • NOT Condition  Negate a condition
  • IS NULL Condition            Test for NULL value
  • IS NOT NULL Condition  Test for NOT NULL value
  • BETWEEN Condition        Retrieve within a range (inclusive)
  • EXISTS Condition              Condition is met if subquery returns at least one row

SQL Data TABLES AND VIEWS:

  • CREATE TABLE   Create a table
  • CREATE TABLE AS             Create a table from another table's definition and data
  • ALTER TABLE      Add, modify or delete columns in a table; rename a table
  • DROP TABLE       Delete a table
  • GLOBAL TEMP Tables, Tables that is distinct within SQL session
  • LOCAL TEMP Tables ,Tables that are distinct within modules and embedded SQL program
  • SQL VIEW            Virtual tables (views of other tables)

Comments

Post a Comment

Popular posts from this blog