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 8952563
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T13:54:08+00:00 2026-06-15T13:54:08+00:00

I added a table to a database with the following column names and datatypes

  • 0

I added a table to a database with the following column names and datatypes

“ID” bigInt, “Description” nchar(11)

If I check the design view of the table, the datatypes of the columns are as I set them.

If I write a query that will get the columns in that table from SYS.COLUMNS the column properties are different e.g.(the max_length of description is 22, not 11)

Can someone explain why that is?

I am using Microsoft SQL Server Enterprise Edition (64-bit) if that is relevant.

  • 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-06-15T13:54:09+00:00Added an answer on June 15, 2026 at 1:54 pm

    The column max_length in sys.columns show the max length in bytes. nchar is double byte so 11 chars take 22 bytes.

    If you want the number of characters you could use INFORMATION_SCHEMA.COLUMNS

    select COLUMN_NAME, CHARACTER_MAXIMUM_LENGTH
    from INFORMATION_SCHEMA.COLUMNS
    where TABLE_NAME = 'YourTable'
    

    Or you could use the function COLUMNPROPERTY

    select name,
           columnproperty(object_id, name, 'charmaxlen') as charmaxlen
    from sys.columns
    where object_name(object_id) = 'YourTable'
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

We've added a new column to a database table. The column is defined as
I have a table that contains the following columns: @Column(name=CTDESTATUS) private String status; @Column
I have recently added a new column (age) to a database table (user). I
I have been able to set up OBDC in Filemaker, and added table ,
I am building an app using storyboard. I have added a table view to
The contents of the following div is derived dynamically: i.e a table is added
I added some columns to a table using rails and rake, but they do
I've added a tableView and dragged a table view cell into it. in the
In my database there is a table, which has a column of the type
Rails 3.1 Devise 1.4.2 I've added first_name and last_name columns to devise's User table.

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.