What is SQL

What is SQL

 

what is SQL? SQL is a database language that stands for Structured Query Language.SQL provides data management, and data manipulation in a database. It offers a standard way to communicate with the database to perform database operations such as inserting, updating, and deleting the data.

What is SQL

 

 

SQL Syntax

SQL statement has a standard structure, defined with clauses, keywords, and expressions. Using SQL Syntax we can prepare  SQL queries.

What is SQL important keywords?

We use a couple of keywords and clauses of SQL frequently, below is a list of a few important keywords and clauses.

KeywordUse of keyword
SELECTUsed to retrieve data from database
DISTINCTSelects distinct values from table
SELECT TOPSelects Top n records from table
TRUNCATEUsed to delete all data from table
UPDATEUsed to modify records
INSERTUsed to insert new record in a table
DELETEdelete all or specific rows from table
WHEREUsed to filter data based on conditions
NOT NULLThis constraint used to enforce column not accept null data
ORto get rows where either condition is true
ANDIncludes rows which satisfy the condition
JOINUsed to join tow or more tables
INUsed to specify multiple values in condition
HAVINGUsed in place of WHERE with aggregate functions
FROMdefines which tables data to be used
DROPUsed to drop table
ORDER BYUsed to define the order of data retrieval
IS NULLCheck for empty values
IS NOT NULLCheck for non empty values

Why SQL?

  •  SQL Provides access to manage and read  relational database management systems
  • Allows users to create and drop databases and tables
  • Allows users to perform query optimization
  • Allows the user to perform various DDL, and DML operations
  • Allows users to provide permissions  over database objects such as tables, views, stored procedures