Please note, this is a STATIC archive of website www.javatpoint.com from 19 Jul 2022, cach3.com does not collect or store any user information, there is no "phishing" involved.
Javatpoint Logo
Javatpoint Logo

T-SQL Tutorial

T-SQL (Transact SQL) tutorial is designed for both beginners and professionals. T-SQL expands the SQL to include procedural programming, local variables, string processing, data processing, and mathematics.

Our tutorial provides the basic and advanced concept of T-SQL.

T-SQL (Transact-SQL) is the extension of SQL (Structured Query Language) language. This tutorial covers the core concepts of T-SQL. It covers various functions, procedures, indexes, and transactions, which are related to this topic. Each topic is explained with the help of examples.

What is T-SQL?

In the year the 1970s, the language 'SEQUEL' (structured English query language), was developed by IBM. After some time, SEQUEL was renamed to 'SQL' which stands for Structured Query Language.

ANSI approved SQL in the year of 1986, and after that, in 1987, International Standard Organization (ISO) authorized it.

Different RDBMS vendors developed their database language to extending SQL for their products.

T-SQL is known as Transact Structured Query Language, which is the product of Microsoft.

Each variable, column, and expression in SQL is the data type in SQL Server. The data types are used when we create tables. We use the data type for the column of the table based on its requirements.

T-SQL expands the SQL to include procedural programming, local variables, string processing, data processing, and mathematics.

The definition of Transact- SQL is the extension of Normal SQL. It performs the operations on the data from the single row retrieval. The syntax of T-SQL is something different from another language. But it has the functionality which generates the same results as other database languages. The American National Standards founded the SQL server T-SQL in 2014.

Comparison chart of SQL and T-SQL

T-SQL Tutorial
BASIS FOR COMPARISON SQL T-SQL
Language Non-procedural Procedural
Feature Open-source Proprietary feature
Functions provided Data manipulation and data controlling Local variable and procedural programming language
Query submission of both One by one submission transfer in bulk

The most popular T-SQL statement is stored procedure, which is compiled and stored by the T-SQL code. Stored procedure are executed when they called.

User-defined functions are the example of the Transact-SQL statement.

T-SQL Tutorial

Restoring the database with Transact-SQL

The triggers are used AFTER triggers or in place of triggers. These applications can insert, delete, read, or update data stored in a database.

Common language runtime integration is a vital T-SQL statement. Since, the SQL Server 2005 is integrated with the .NET. It enables us to use .NET programming with the objects of SQL.

T-SQL Tutorial

Types of functions in T-SQL:

  • Aggregate functions: It operates on any collection of values, but returns one value.
  • Ranking function: It returns a ranking value for partitioning every row.
  • Rowset functions: It is used as a table reference in the SQL statement.
  • Scalar functions: It returns the unique value and operating the single one. In T-SQL, SQL Server supports the analytics function to depict the analytical tasks.

Prerequisites

To understand the T-SQL language, you should be familiar with database concepts. The SQL Server must be installed on your computer, so it will assist you in executing the examples and you will know it's working.

Audience

The tutorial is designed for those who want to learn the basics of Transact-SQL. The tutorial aims to describe all the Transact SQL functions and procedures.

Problem

We assure you that you will not find any problem in this T-SQL (Transact-SQL) tutorial. But if there is any mistake, post the problem in the contact form.


Next TopicData types T-SQL





Youtube For Videos Join Our Youtube Channel: Join Now

Feedback


Help Others, Please Share

facebook twitter pinterest

Learn Latest Tutorials


Preparation


Trending Technologies


B.Tech / MCA