SQLiteDatabase db = openOrCreateDatabase("MyDatabaseName",
MODE_PRIVATE, null);
db.execSQL("CREATE TABLE MyTableName (_id INTEGER PRIMARY KEY
AUTOINCREMENT, YourColumnName TEXT);");
// Since SQL doesn't allow the insertion of a completely empty row, the
// second parameter of db.insert defines the column that will receive
// NULL if cv is empty
ContentValues cv = new ContentValues();
cv.put("YourColumnName", "YourColumnValue");
db.insert("MyTableName", "YourColumnName", cv);
On Friday, August 17, 2012 4:53:15 AM UTC-5, Sadhna Upadhyay wrote:
>
> Hi everyone,
> can some one tell me how to create and retrieve data from database
> ,actully there are so many example on sites but those are not clear can any
> ione help me database
>
--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en