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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T22:32:01+00:00 2026-06-13T22:32:01+00:00

I decided to add a second table for my app. I keep getting a

  • 0

I decided to add a second table for my app. I keep getting a syntax error even though its almost exactly the same setup as the first table creation string.

private static final String BUDGET_TABLE = "budgets";
private static final String KEY_ROW_ID_BUDGET = "_id";
private static final String KEY_BUDGET_LIMIT = "limit";
private static final String KEY_BUDGET_CURRENT_AMOUNT = "current_amount";

This string throws the syntax error near ‘limit’

private static final String BUDGET_CREATE =
        "create table "+ BUDGET_TABLE +" ( "+ KEY_ROW_ID_BUDGET+" integer primary key autoincrement, "
        + KEY_BUDGET_LIMIT+" text not null, "+ KEY_BUDGET_CURRENT_AMOUNT+" text);";


db.execSQL(BUDGET_CREATE);
  • 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-13T22:32:02+00:00Added an answer on June 13, 2026 at 10:32 pm

    Its simple, you can/should not use keywords while creating table. You are using limit as column which is invalid, hence it is giving you runtime error, i suggest you to change it to something like budget_limit like below, and then try again.

    private static final String BUDGET_TABLE = "budgets";
    private static final String KEY_ROW_ID_BUDGET = "_id";
    private static final String KEY_BUDGET_LIMIT = "budget_limit";
    private static final String KEY_BUDGET_CURRENT_AMOUNT = "current_amount";
    
    private static final String BUDGET_CREATE =
            "create table "+ BUDGET_TABLE +" ( "+ KEY_ROW_ID_BUDGET+" integer primary key autoincrement, "
            + KEY_BUDGET_LIMIT+" text not null, "+ KEY_BUDGET_CURRENT_AMOUNT+" text);";
    
    
    db.execSQL(BUDGET_CREATE);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have decided to add some validation to my combobox, what I'm trying to
I am currently coding an application then decided to add HoloEverywhere into my application.
I'm new to xcode and objective-c. I also decided to add unit (logic) tests
My last company, which used 4.01 DOCTYPE exclusively, decided to add some new functionality
I'm trying to add the facebook connect feature to my site, I decided to
To allow users and site admins to view/add/edit/delete data in my application I decided
I'm fairly new to the unit testing world, and I just decided to add
Recently, I decided to add 4 languages to my application. I read about how
Ok I'm learning how shell commands work, so I decided to develop a app
need to add a downward facing arrow to a text box. decided to use

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.