我需要在advisor_name
表
Employee
where Advisor Name = Last_Name + ", " + First_Name
答案 0 :(得分:1)
您可以添加持久计算列,而不是创建索引。 有关详细信息:Indexes on Computed Columns
ALTER TABLE dbo.EmployeeTable
ADD AdvisorName AS Last_Name + ', ' + First_Name PERSISTED
GO
CREATE INDEX IX_EmployeeTable_AdvisorName ON dbo.EmployeeTable
(AdvisorName)