SQL 2012

SQL(Structure Query Language)

What is SQL?

SQL stands for Structured Query Language. SQL is used to communicate with a database. According to ANSI (American National Standards Institute), it is the standard language for relational database management systems. 

SQL statements are used to perform tasks such as update data on a database, or retrieve data from a database. Some common relational database management systems that use SQL are: Oracle, Sybase, Microsoft SQL Server, Access, Ingres, etc.

 This language was developed by IBM in 1970s.

Types of SQL Statements:-

The Sql Statements can be divided into the following categories.

Data Definition Language (DDL):-
Is used to define the database, data types, structures, and constraints on the data. Some of the DDL statements are:-

Used to create a new database object, such as table.

Used to modify the database objects.

Used to delete the objects.

Data Manipulation Language (DML):-
Is used to manipulate the data in database objects. Some of the DML statements are:-

Used to insert a new data record in a table.

Used to modify an existing record in a table.

Used to delete a record from a table.

Data Control Language(DCL):-
Is used to control the data access in the database. Some of the DCL statements are:-

Used to assign permissions to users to access a database object.

Used to deny permissions to users to access a database object.

Data Query Language(DQL):-
Is used to query data from database objects. Select is the DQL statement that is used to select data from the database in different ways and formats.

SQL is not a case sensitive language.

Identifying Data Types:-

  1. Numeric
  2. Character String
  3. Date and Time
  4. Binary
  5. Others

The numeric data types allow you to store integer values in the database. The following table lists the numeric data types supported by sql server.

Character and String:-
The character and string data types allow you to store text values in the database.

Data and Time:-
The date and time data types allow you to store date and time values in the database.

The binary data types allow you to store binary data in the database.

The other data types allow you to store unique identifiers, cursors, table, XML, and spatial data in the database.

No comments:

Post a Comment