IF EXISTS (SELECT * FROM sys.views WHERE object_id = OBJECT_ID(N'[dbo].[vMsTruckUser]')) DROP VIEW [dbo].[vMsTruckUser] GO SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE VIEW [dbo].[vMsTruckUser] AS SELECT GID GID,CodeName as UserCode, ShowName as UserName, CodeName+'-' + ShowName as CodeAndName FROM dbo.[user] GO