Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7534911
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T06:09:14+00:00 2026-05-30T06:09:14+00:00

I need help with SQL Server Table Column. I´m trying to rename Column Name,

  • 0

I need help with SQL Server Table Column.
I´m trying to rename Column Name, but this doesn’t work.

USE COST_mesta_test
GO
EXEC sp_rename '[dbo].[1965$].obec' , 'people' , 'COLUMN'
GO

I tried different combination of brackets [] and path to table “obec”
(for example: 1965.obec; 1965$.obec; 1965.[obec]; etc.)
But still i get an error:

Either the parameter @objname is ambiguous or the claimed @objtype
(COLUMN) is wrong.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-30T06:09:16+00:00Added an answer on May 30, 2026 at 6:09 am

    I don’t really understand how your table is set up – ie. the table name, the column name etc – so this is an example of how the proc works for column renames:

    If I had a table like this:

    CREATE TABLE [dbo].[Company](
    [ID] [int],
    [CompanyName] [varchar](20)
    )
    

    and wanted to change the [CompanyName] column, this is the command:

    EXEC sys.sp_rename 
        @objname = N'dbo.Company.CompanyName', 
        @newname = 'Name', 
        @objtype = 'COLUMN'
    

    I suspect that your first argument is not correct.

    From the documentation (sp_rename (Transact-SQL))

    If the object to be renamed is a column in a table, object_name must be in the form table.column or schema.table.column. If the object to be renamed is an index, object_name must be in the form table.index or schema.table.index

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Okay, I need help. I'm usually pretty good at SQL queries but this one
I need your help :) I have a table in a database (SQL Server
Need help with this SQL Server 2000 procedure. The problem is made difficult because
I need some help with SQL Query. I am trying to select all records
I'm trying to make my SQL Server table datetime columns save datetime with AM/PM.
I have an Sql Server Table.. it's something like this: Id ...... Column1 ......
I need help in writing queries which will update MySql tables from SQL server.
Similar but NOT IDENTICAL to SQL Server 2000 - Query a Table’s Foreign Key
My table structure (in SQL Server) looks something like this: (D1 is more recent
I have a table in SQL Server 2000 that I am trying to query

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.