The dialect of SQL that Microsoft uses for Azure SQL and SQL Server. Azure Monitor logs are queried with KQL instead.
Also called Transact-SQL.
Read more: Microsoft Learn
In the Ultra Transcenders books
Each book explains T-SQL in context, with comparison tables and the common traps.
Terms in this definition
- Serverless
Compute tier for single Azure SQL databases that scales automatically, pauses when idle and charges by the second. It is offered in General Purpose and Hyperscale, not Business Critical, and reserved capacity does not apply.
- Auditing
Azure SQL capability that sends database audit logs to Log Analytics, Event Hubs or a storage account; that account is allowed to be in a different region.
- SQL Server
The relational database from Microsoft that organisations host and run themselves, in their own data centres or on VMs. Its engine also sits underneath the Azure SQL services and SQL database in Fabric.
- Azure Monitor Logs
Within Azure Monitor, the store for log data: records of logs and performance counters are kept in Log Analytics workspaces, where KQL queries retrieve them.
- KQL
Kusto Query Language, used read-only to query Azure Data Explorer, Log Analytics and Microsoft Sentinel; log alert rules are written in it too.
Related terms
- CAST
Converts a value to a different data type using the syntax
CAST(expr AS type); this ANSI-standard T-SQL function errors out if the conversion can't be done. - CETAS
Writes the result of a query out to external storage as files (CSV or Parquet, say), in parallel, and creates an external table over them, all in one T-SQL statement.
- COALESCE
Picks the first argument that is not NULL. In T-SQL loads this is often used to replace a missing lookup result with an Unknown member key such as -1.
- Column-level encryption
Encrypting values one at a time using a database-held symmetric key and T-SQL functions such as
ENCRYPTBYKEY. Always Encrypted works differently: here, the app itself has to call T-SQL to encrypt and decrypt. - Compatibility level
Determines which Database Engine version a database's T-SQL and query processing imitate. Certain new functions,
REGEXP_LIKEamong them, won't work below 170. - Compute permissions
Access rules that live inside one Fabric engine and govern only queries run through it. They include T-SQL GRANT or DENY, masking and row-level security on a warehouse or SQL analytics endpoint, and DAX-based security in a semantic model.
- CONVERT
Works much like
CAST, changing a value's data type in T-SQL, with the addition of an optional style number; 126, for instance, gives ISO 8601 dates. - CREATE USER FROM EXTERNAL PROVIDER
Statement in T-SQL that adds a contained database user for an Entra identity, whether a person, group, managed identity or service principal. Doing so enables Entra sign-in to that database but leaves SQL logins working.