I used a database object to connect to the database and then execute the query using the same. I ll provide a snippet for your reference
private SQLiteDatabase db;
public DataHelper(Context context) {
this.context = context;
OpenHelper openHelper = new OpenHelper(this.context);
this.db = openHelper.getWritableDatabase();
}
db.execSQL("CREATE TABLE " + TABLE_NAME + "(id INTEGER PRIMARY KEY AUTOINCREMENT, name TEXT, locationx REAL,locationy REAL)");
Hope this helps!
Thanks
Vikas
(GO TROJANS)
Not really. A simple list of data typed up, which you can do in a desktop publishing application, is a database in its simplest form. You can create a table and type data into it, but you cannot really manipulate it and do things with it that you can do with a table in a proper database application. Desktop Publishing does not provide the facilities to create databases and manipulate them, so if you want to create a proper database you would not use a desktop publishing application.
In Access, when you create a new database, a table is created first.
A table in database can be created using create table command . Create command comes under data manipulation language.
It depends on the database software. General syntax is: create table TABLENAME define columns (data type, not null)
you can create max. 249 ncli in a table you can create max. 249 ncli in a table
Database can planned according to the requirements of users. Create schema based on the data you want to store and then create table for storing data.
A DataGridView control in a Windows Forms application can display data from a database table. You can bind the DataGridView to a data source such as a DataTable or a collection of objects, and it will automatically display the data from the database table in a tabular format.
You start by creating a table.
SQL (Structured Query Language) enables a database administrator to define schema components, such as tables, columns, indexes, and relationships in a database. By using SQL commands like CREATE TABLE, ALTER TABLE, and CREATE INDEX, administrators can create and modify the structure of a database according to their requirements.
They are stored on a hard drive or some other permanent storage device. The database application stores a table that identifies related files.
Database can be created using any of the following commands in DML (Data manipulation language). Create - for creating table ,insert - for inserting values , Update - for updating table etc.
A database can be created using DML (data manipulation language). Example create table table_name (name datatype , name datatype...... ) .