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

  • Home
  • SEARCH
  • 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 41171
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 10, 20262026-05-10T15:08:18+00:00 2026-05-10T15:08:18+00:00

Trying to make a MySQL-based application support MS SQL, I ran into the following

  • 0

Trying to make a MySQL-based application support MS SQL, I ran into the following issue:

I keep MySQL’s auto_increment as unsigned integer fields (of various sizes) in order to make use of the full range, as I know there will never be negative values. MS SQL does not support the unsigned attribute on all integer types, so I have to choose between ditching half the value range or creating some workaround.

One very naive approach would be to put some code in the database abstraction code or in a stored procedure that converts between negative values on the db side and values from the larger portion of the unsigned range. This would mess up sorting of course, and also it would not work with the auto-id feature (or would it some way?).

I can’t think of a good workaround right now, is there any? Or am I just being fanatic and should simply forget about half the range?

Edit:
@Mike Woodhouse: Yeah, I guess you’re right. There’s still a voice in my head saying that maybe I could reduce the field’s size if I optimize its utilization. But if there’s no easy way to do this, it’s probably not worth worrying about it.

  • 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. 2026-05-10T15:08:19+00:00Added an answer on May 10, 2026 at 3:08 pm

    When is the problem likely to become a real issue?

    Given current growth rates, how soon do you expect signed integer overflow to happen in the MS SQL version?

    Be pessimistic.

    How long do you expect the application to live?

    Do you still think the factor of 2 difference is something you should worry about?

    (I have no idea what the answers are, but I think we should be sure that we really have a problem before searching any harder for a solution)

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

Sidebar

Ask A Question

Stats

  • Questions 73k
  • Answers 73k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • added an answer Of what relevance is PDO_SQLITE? Unless you actually plan on… May 11, 2026 at 2:06 pm
  • added an answer The only real way to change the value of the… May 11, 2026 at 2:06 pm
  • added an answer Inspections can be disabled in R#, so yes, this is… May 11, 2026 at 2:06 pm

Related Questions

Trying to make a make generic select control that I can dynamically add elements
Trying to make a generic PL/SQL procedure to export data in specific XML format,
Trying to make a web service call to an HTTPS endpoint in my Silverlight
I'm trying to make a data bound column invisible after data binding, because it
Well this is incredibly frustrating. After being nagged by Rails that I need to
I am trying to add a column (MSSQL 2005) to a table (Employee) with
I've had a hard time trying to find good examples of how to manage
Given a table named person (in a MySQL database/schema), kind of like this one:

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

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.