SQL Server error 4104: Multi-part identifier not bound
A reference like t.Column or Table.Column names a table or alias that isn't in scope at that point of the query, often after aliasing a table.
- Error number
4104- Severity
- 16
- Category
- Names and objects
What it means
A multi-part identifier is a column reference with a prefix, such as o.OrderId or dbo.Orders.OrderId. SQL Server raises 4104 when the prefix doesn't match any table name or alias visible in that part of the query.
Common causes
- The table was given an alias, but the query still uses the full table name (
FROM dbo.Orders o ... WHERE Orders.Id = 1). Once aliased, only the alias works. - A typo in the alias.
- Referring to a table from an outer query or another join in a place it isn't visible, for example in an
ONclause before that table is joined. - In an
UPDATE ... FROMorDELETE ... FROM, using a name that isn't in theFROMclause.
How to fix it
-
Use the alias consistently once you've defined it.
SELECT o.OrderId, c.Name FROM dbo.Orders AS o JOIN dbo.Customers AS c ON c.CustomerId = o.CustomerId WHERE o.OrderDate >= '2025-01-01';
-
Order joins so each
ONclause only refers to tables already joined.SELECT * FROM dbo.A AS a JOIN dbo.B AS b ON b.AId = a.Id JOIN dbo.C AS c ON c.BId = b.Id;
-
In
UPDATE ... FROM, update through the alias.UPDATE o SET o.Status = 'shipped' FROM dbo.Orders AS o JOIN dbo.Shipments AS s ON s.OrderId = o.OrderId;
Reproduce it safely
SELECT Orders.OrderId FROM (VALUES (1)) AS o(OrderId); -- Msg 4104
Related errors
207Invalid column name208Invalid object name209Ambiguous column name42P01PostgreSQL: relation does not exist1054MySQL: Unknown column in field list
More names and objects errors
2812Could not find stored procedure2714There is already an object named3701Cannot drop, object not found3702Cannot drop database, currently in use5030Database couldn't be exclusively locked8144Too many arguments specified8145Is not a parameter for procedure8146Procedure has no parameters
The code and message text are from the Microsoft Database Engine events and errors reference. Browse the full SQL Server error list or search every database error.
Work on SQL Server in SQLly
A native SQL client for macOS, Windows and Linux with schema-aware IntelliSense, guardrails for risky statements and clear error messages, for SQL Server and the other databases you use.