Introduction of Transact-SQL
In this article I am going to explain about Transact-SQL.
Introduction
Transact-SQL (T-SQL) is Structured Query Language and it is Microsoft's and Sybase's proprietary. Transact-SQL is originally developed by IBM for querying, altering and defining relational database. Transact SQL is also known as T-SQL. T-SQL supports many feature like variables, loops, conditions and exceptions.
T-SQL provide the fallowing feature
- Stored Function
- Stored procedure
- Trigger
- Index
- View
T-SQL provide the programming concept. It also provide a wide variety of data types for variables and constants. SQL provide limited support for advance programming and T-SQL fill this gap.
Example
declare
@emp_id int = 200,
@emp_sal money
if(@emp_id>0 and @emp_id<100)
begin
print (' Name and salary ' )
select name,salary from mcnemp where id = @emp_id
end
else
begin
print('employee id is not correct')
end
|