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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T21:37:42+00:00 2026-06-17T21:37:42+00:00

I have a table which has a VARCHAR(MAX) column, and I need to change

  • 0

I have a table which has a VARCHAR(MAX) column, and I need to change it to VARBINARY(MAX).

I tried using the command

ALTER TABLE TableName ALTER COLUMN ColumnName VARBINARY(MAX)

but I got the error

Msg 257, Level 16, State 3, Line 1
Implicit conversion from data type varchar(max) to varbinary(max) is not allowed.
Use the CONVERT function to run this query.

The table has no data, so I can’t understand why it’s complaining about data conversion.

  • 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-17T21:37:44+00:00Added an answer on June 17, 2026 at 9:37 pm

    You cannot perform this conversion using an ALTER TABLE statement since converting from varchar(max) to varbinary(max) requires an explicit conversion. So you should follow these steps to alter your table:

    1. Alter table with new column of VARBINARY(MAX)
    2. If you have existing data in the VARCHAR(MAX) column, use update statement to add the data to the VARBINARY column
    3. Alter table to drop the VARCHAR(MAX) column
    4. Rename varbinary column to varchar name (per comment from @Ben Thul)
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a table which has two varchar(Max) columns Column 1 Column 2 -----------------------
I have two tables: tab1 and tab2. Every table has only one VARCHAR(MAX) column.
I have a table which has a column 'Faktor' (varchar(50)) which contains expressions like:
I have an SQL Server 2005 table that has a varchar(250) field which contains
I have a table which has a column called Direct of type char(1). It's
I have a table which has a NVARCHAR column, which could contain a GUID
I have two tables, the first is a 'users' table which has a column
I have an addresses table with ZIP code field which has type VARCHAR. I
I have the below table which has 2 columns.I need to write a query
I have a table foo , which has a NOT NULL column with a

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.