Altering the View in SQL Server 2005

Posted on 2011-05-04
Last Modified: 2012-05-11
Hello Friends,

I have a view in SQL Server DB. I need to change the alias name of the column

SELECT AU.[Login],  
 ISNULL(AU.[LastName], ' ') AS 'LastName',  as LastName2

How do i do it?
Question by:SubbuUSA
    1 Comment
    LVL 40

    Accepted Solution

    Alter the View definition.
    ALTER VIEW ViewName AS 
    SELECT AU.[Login], 
           ISNULL(AU.[LastName], ' ') AS LastName2  

    Open in new window


    Featured Post

    Looking for New Ways to Advertise?

    Engage with tech pros in our community with native advertising, as a Vendor Expert, and more.

    Join & Write a Comment

    When writing XML code a very difficult part is when we like to remove all the elements or attributes from the XML that have no data. I would like to share a set of recursive MSSQL stored procedures that I have made to remove those elements from …
    Use this article to create a batch file to backup a Microsoft SQL Server database to a Windows folder.  The folder can be on the local hard drive or on a network share.  This batch file will query the SQL server to get the current date & time and wi…
    Migrating to Microsoft Office 365 is becoming increasingly popular for organizations both large and small. If you have made the leap to Microsoft’s cloud platform, you know that you will need to create a corporate email signature for your Office 365…
    In this sixth video of the Xpdf series, we discuss and demonstrate the PDFtoPNG utility, which converts a multi-page PDF file to separate color, grayscale, or monochrome PNG files, creating one PNG file for each page in the PDF. It does this via a c…

    730 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    18 Experts available now in Live!

    Get 1:1 Help Now