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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T17:57:50+00:00 2026-05-30T17:57:50+00:00

In my project I use a sqlite database, unfortunately my friend have make an

  • 0

In my project I use a sqlite database, unfortunately my friend have make an error. A field is with no correct type.
So for the moment when the data in the field ‘localid’ (declare as integer) is more than 2147483647, all entry in this field is set to the max 2147483647.

The alter table/alter column sql request do not works with sqlite because it supports a limited subset of ALTER TABLE : only rename and add a new column.

So how can I make a change without data loss? create a new database correctly, coppy all data into it and delete the old?

But maybe there is a better way ? Someone have an idea?

  • 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-30T17:57:51+00:00Added an answer on May 30, 2026 at 5:57 pm

    Proceed like this:

    1. create temporary table that contains fields that form the primary
      key and localid (I assume this is nor PK).
    2. fill temporary table
    3. drop old column
    4. add new column
    5. fill new column by selecting from temporary table (+ possible conversion to new type).

    Don’t forget possible foreign keys if column is used as such and remember possibility to temporally relax constraint if it makes conversion smooth (likely not needed in your case).

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

Sidebar

Related Questions

I use a sqlite database in my project. The stored data in it must
In my project I use System.Data.SQLite . Database has table Tags , which contains
Here's the thing: In my Qt4.6-Project, I use a SQLite-Database. This database shouldn't be
Today I use SQLite and send a database-file with the project. However I want
I have a django project that uses a sqlite database that can be written
The project I'm working on required me to use a sqlite database, and I've
In my iPhone/iPad project, I'm showing some data from SQLite database. This database is
In my iPhone project,I use Odata Service to get data from SQL Server database
I want to use SQLite as a database for my C++ project. I also
I am trying to use fts in my sqlite database, i have created 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.