T-SQL in Microsoft Fabric

T-SQL surface area

  • In Microsoft Fabric, you can create, change, and delete tables, and add, change, or remove data, but only in the Warehouse part, not in the SQL analytics part of the Lakehouse.
  • However, you can still make your own views, functions, and procedures using T-SQL with the tables in the SQL analytics part of the Lakehouse.

T-SQL Limitations in Microsoft Fabric

At this time, the following list of commands is NOT currently supported. 

  • ALTER TABLE ADD/ALTER/DROP COLUMN
  • BULK LOAD
  • CREATE ROLE
  • CREATE USER
  • Hints
  • Identity Columns
  • Manually created multi-column stats
  • MATERIALIZED VIEWS
  • MERGE
  • OPENROWSET
  • PREDICT
  • Queries targeting system and user tables
  • Recursive queries
  • Result Set Caching
  • Schema and Table names can’t contain / or \
  • SELECT – FOR
  • SET ROWCOUNT
  • SET TRANSACTION ISOLATION LEVEL
  • sp_showspaceused
  • Temp Tables
  • Triggers
  • TRUNCATE

Data types in Warehouse

Warehouse supports a subset of T-SQL data types:

CategorySupported data types
Exact numericsbit
bigint
int
smallint
decimal
numeric
Approximate numericsfloat
real
Date and timedate
datetime2
time
Character stringschar
varchar
Binary stringsvarbinary
uniqueidentifer

Unsupported data types

Unsupported data typeAlternatives available
money and smallmoneyUse decimal, however note that it can’t store the monetary unit.
datetime and smalldatetimeUse datetime2.
nchar and nvarcharUse char and varchar respectively, as there’s no similar unicode data type in Parquet.
text and ntextUse varchar.
imageUse varbinary.

Related Posts

Secure supply chain: SBOM, SLSA, signing, provenance (plain English)

If you ship software today, you don’t just ship your code. You ship: That whole chain is your software supply chain. And attackers love it, because instead…

Read More

CI/CD for Cloud Apps: Build → Scan → Deploy → Rollback (a practical reference pipeline)

CI/CD sounds simple until you’re responsible for a production system and realize: This guide gives you a reference CI/CD pipeline you can adopt for most cloud apps…

Read More

Policy as Code: OPA/Rego basics + how it prevents bad infra

You know that feeling when an incident starts with a sentence like: Most “bad infra” isn’t malicious. It’s normal engineering drift:new hires, rushed PRs, copy-paste manifests, unclear…

Read More

Reusable IaC Module Design: naming, inputs/outputs, versioning (the engineer’s playbook)

Reusable IaC modules are like internal libraries: if the “API” is clean, teams move fast. If it’s messy, everyone forks it, patches it, and you end up…

Read More

GitOps explained: Argo CD vs Flux, patterns, and anti-patterns

GitOps is one of those ideas that sounds like buzzwords… until you run it for 30 days and suddenly you can’t imagine operating Kubernetes without it. Because…

Read More

Terraform vs CloudFormation vs Pulumi: which fits which team (the practical, engineer-first guide)

You’re not really choosing a tool. You’re choosing how your team will think about infrastructure for the next 2–5 years: This guide helps you decide fast, without…

Read More
guest
0 Comments
Oldest
Newest Most Voted
0
Would love your thoughts, please comment.x
()
x