Results 1 to 4 of 4

Thread: Change field name

  1. #1

    Thread Starter
    Fanatic Member
    Join Date
    Jul 2006
    Location
    nasik,india
    Posts
    909

    Question Change field name

    Hi.
    I want a way by which i can change field name for each table in my access/sql server 2005 database.
    Means for each table containing "desc" field name as to change with "desc1"
    How to do it with coding or with some specific command ?
    WHETHER YOU SUCCEED OR FAIL IS NOT AS IMPORTANT AS WHETHER YOU TRIED YOUR BEST

  2. #2
    A SQL Server fool GaryMazzone's Avatar
    Join Date
    Aug 2005
    Location
    Dover,NH
    Posts
    7,493

    Re: Change field name

    You use the alter table command.
    Sometimes the Programmer
    Sometimes the DBA

    Mazz1

  3. #3

    Thread Starter
    Fanatic Member
    Join Date
    Jul 2006
    Location
    nasik,india
    Posts
    909

    Re: Change field name

    alter table tblname
    rename column oldcolname to newcolumnname

    but this gives me error as "synatax error "
    WHETHER YOU SUCCEED OR FAIL IS NOT AS IMPORTANT AS WHETHER YOU TRIED YOUR BEST

  4. #4
    A SQL Server fool GaryMazzone's Avatar
    Join Date
    Aug 2005
    Location
    Dover,NH
    Posts
    7,493

    Re: Change field name

    For SQL Server use sp_Rename stored proc.

    a quick google search

    http://www.google.com/search?hl=en&r...Server&spell=1

    did you even try and look this up?
    Sometimes the Programmer
    Sometimes the DBA

    Mazz1

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width