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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T14:35:57+00:00 2026-06-11T14:35:57+00:00

Say we had created simple db table like: CREATE TABLE IF NOT EXISTS users

  • 0

Say we had created simple db table like:

CREATE TABLE IF NOT EXISTS users (email varchar(100) UNIQUE NOT NULL primary key, pass varchar(100))

now we want to CREATE TABLE IF NOT EXISTS or merge with previous one that would look like

users (email varchar(100) UNIQUE NOT NULL primary key, name varchar(100))

so if table existed we want to remove pass column and add name column.

Is such thing possible via SQL commands and SQLite pragmas or how to do it using C SQLite api?

  • 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-11T14:35:59+00:00Added an answer on June 11, 2026 at 2:35 pm

    As it turns out, in SQLite you’d have to recreate the entire table if you want to drop a single column. The example at the link provided is pretty good – you may want to tweak it to suit your needs, though.

    Here’s what I came up with.

    CREATE TEMPORARY TABLE users_1(email varchar(100) unique not null primary key, user varchar(100));
    INSERT INTO users_1 SELECT email, '' FROM users;
    DROP TABLE users;
    CREATE TABLE users(email,user varchar(100));
    INSERT INTO users SELECT email, user FROM users;
    DROP TABLE users_1;
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Lets say you had a simple form to create a new article object in
I have not had to create an executable for multiple users, and I am
Looking for a non-JS solution. Say I had something like this: <ul> <li> <form>
Let's say I had an app that was an address book. I'd like to
First off I'd like to say this is the only java experience I've had.
Let's say you had a fairly basic client/server code, where each client creates three
Say I had the two tables below, how do I find all questions with
Say I had the following HTML: <h2>Heading <span></span></h2> <ul> <li><a href=# title=I am wanting
Say I had (foolishly) setup a Silverlight project in VS and failed to setup
Lets say i had a a button that cycles through numbers how can i

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.