Transact SQL
Transact SQL
What’s T-SQL?
• T-SQL is a query lsnguage specific to SQL server
• Mostly performs operations like retrieving data from a single row, insert new row and
retrieving multiple rows
• T-SQL is a procedural language used by Microsoft in SQL Server. It adds declared
variables, transaction control, error and exception handling, and row processing to SQL.
Features of T-SQL
• T-SQL has a BULK INSERT statement that allows users to import a file into the
database table or view in a user-specified format.
• T-SQL provides various support functions for string processing and data processing
Types of functions in T-SQL
• Aggregate Functions: It operates on a collection of values but returns a single value.
• Ranking Function: It returns a ranking value for each partitioning row.
• Scalar Functions: It operates on a single value and returns a single value.
Aggregate Function
• This function returns one value after calculating multiple values of a columns
1. UCASE()
2. LCASE()
3. MID()
4. LENGTH()
5. ROUND()
6. NOW()
7. FORMAT()
Scalar Function Description
Example