Hey Guys,
I was look at someone else's code and I don't understand why they would alias each field with [Extent1] when they aliased the table.
Or why would they add an AS on each field with the same name.
Any thoughts?
Thanks Simi
I was look at someone else's code and I don't understand why they would alias each field with [Extent1] when they aliased the table.
Or why would they add an AS on each field with the same name.
Any thoughts?
Thanks Simi
SQL:
SELECT
[Extent1].[Premise_Equipment_ID] AS [Premise_Equipment_ID],
[Extent1].[Premise_Equipment_Type_ID] AS [Premise_Equipment_Type_ID],
[Extent1].[Serial_Number] AS [Serial_Number],
[Extent1].[MAC_ID] AS [MAC_ID],
[Extent1].[IP_Address] AS [IP_Address],
[Extent1].[Date_Installed] AS [Date_Installed],
[Extent1].[Last_Inventory_Date] AS [Last_Inventory_Date],
[Extent1].[Location_At_Premise] AS [Location_At_Premise],
[Extent1].[Equipment_Status_ID] AS [Equipment_Status_ID],
[Extent1].[Additional_Equipment_Notes] AS [Additional_Equipment_Notes],
[Extent1].[Adtran_Information] AS [Adtran_Information],
[Extent1].[Bridging_Instructions] AS [Bridging_Instructions],
[Extent1].[Power_Supply_Information] AS [Power_Supply_Information],
[Extent1].[Changed_Date] AS [Changed_Date],
[Extent1].[Changed_User] AS [Changed_User]
FROM [dbo].[Premise_Equipment] AS [Extent1]
WHERE [Extent1].[Premise_Equipment_Type_ID] = @EntityKeyValue1