简体   繁体   中英

SQL Statement with weird alias

In a sql stored procedure I see a block of sql that looks like this:

SELECT @GenPlanGuid = GenPlanGuid
FROM ACM.BeeBusiness
WHERE BeeBusinessGuid = @BeeBusinessGuid

There is no database named ACM, no linked server, no functions, nothing that is a subselect with an alias like this --> (select something from something) ACM

So where is that alias hidden?

It could be the 'schema name', sometimes referred to as 'owner name' or 'user name'.

Which DBMS?

It could be the owner of the table. If a table name is qualified, it could be written as [dbo].[tableName], where [dob] is the name of the account that owns the table. If ACM was a user who created that table, and didn't change the owner to dbo, this could happen.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM