Tutorials References Exercises Menu

Zeal For Wisdom


Transact SQL(T-SQL)

Definition

T-SQL (Transact-SQL) is an extension of SQL language. This tutorial covers the fundamental concepts of T-SQL such as its various functions, procedures, indexes, and transactions related to the topic. Each topic is explained using examples for easy understanding

Types of T-SQL Statement

  1. DML(Data Manipulation Language) – Used to retrieve, store, modify, delete, insert and update data in database.
    Examples:SELECT, UPDATE, INSERT
  2. DDL(Data definition Language) - Used to create and modify the structure of database objects in database.
    Examples:CREATE, ALTER, DROP 
  3. DCL (Data Control Language) – These SQL commands are used for managing security of database objects.
    Examples:GRANT, REVOKE

DATA TYPES

SQL Server data type is an attribute that specifies types of data of any object. Each column, variable and expression has related data type in SQL Server. These data types can be used while creating tables. You can choose a particular data type for a table column based on your requirement
  • nchar and nvarchar can store Unicode characters
  • char and varchar cannot store Unicode characters
  • char and nchar are fixed-length which will reserve storage space for number of characters you specify even if you don't use up all that space
  • varchar and nvarchar are variable-length which will only use up spaces for the characters you store. It will not reserve storage like char or nchar

Read More ...


Zeal For Wisdom

Learn Today For Better Tomorrow