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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T15:49:09+00:00 2026-06-01T15:49:09+00:00

I used the same command syntax above as in Mysql and would like set

  • 0

I used the same command syntax above as in Mysql and would like set a unique key for the tables’s filed on Android Device environment, however, the error prompted in LogCat:

03-23 16:16:45.580: E/Database(657): Failure 1 (near “UNIQUE”: syntax
error) on 0x2c0240 when preparing ‘ALTER TABLE game ADD
UNIQUE(name);’.

Checking the SQLite’s doc, it seems that SQLite does not use this way for setting a unique key. Does anyboy know to do it ? Thanks for response inadvance !

  • 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-01T15:49:10+00:00Added an answer on June 1, 2026 at 3:49 pm

    sqlite support alter in another way.
    You can try the following:
    create unique index unique_name on game(name);
    If you want to create a constraint for two or more columns at one time:
    create unique index unique_name on game(name1,name2,mame3);

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

Sidebar

Related Questions

A custom RoutedCommand is used by some menuItems; I would like to use the
I have used same command button Click event for both Insert, Update functionalities. I'm
I used same function ( OneWayEncrypt(edit1.Text) ) in Delphi 5 and 2010. Why the
I know the default is ByVal in C#. I used same variable names in
I used the same software used here http://us.gn.bartal.org/ to create a fixed width/height treemap
This one boggles my mind. I've used this same script (different targets of course)
I don't understand why I'm getting this error. I used the same code previously
I have some objects which will be used in the same manor. This object
Is there a Python module that can be used in the same way as
I have two SQL Server (2000) databases. Both are used for the same project,

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.