Creación de Tablas

 Para la creación de las tablas se usa estas sentencias en método onCreate,

ejemplo:

@Override
public void onCreate(SQLiteDatabase db)
{
db.execSQL("create table clientes(cedula int primary key ," +
" nombre text, direccion text, telefono int)");

db.execSQL("create table pedidos(codigo int primary key ," +
" descripcion text, fecha text, cantidad int)");

db.execSQL("create table productos(codigo int primary key ," +
" descripcion text, valor float)");

db.execSQL("create table facturas(numero int primary key ," +
" fecha text, total float)");

}


Comentarios