create table query using sqlite
3 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
nikhil nambiar
el 12 de Ag. de 2017
Comentada: nikhil nambiar
el 13 de Ag. de 2017
Hi,
I need to know how can I create table in sqlite database using exec. I have created connection object
con=sqlite('dbname.db','create');
I tried exec to create table for above database
curs=exec(conn,create table Atable('sno int primary key,xyz long, adb long'));
matlab throws an error with:
curs=exec(conn,create table R&DE('sno int primary key,latitude long, longitude long'));
↑
Error: Unexpected MATLAB expression.
Next I tried doing
curs=exec(con,['create table R&DE(sno int primary key,latitude long, longitude long)']);
Error using sqlite/exec
Too many output arguments.
A solution or advice to this will be valuable
Thank you!!
0 comentarios
Respuesta aceptada
Walter Roberson
el 12 de Ag. de 2017
Notice that cur is not returned in the example of creating a table:
exec(con, 'create table R&DE(sno int primary key,latitude long, longitude long)' );
Note: you might need to quote that table name:
exec(con, 'create table "R&DE"(sno int primary key,latitude long, longitude long)' );
2 comentarios
Más respuestas (0)
Ver también
Categorías
Más información sobre Introduction to Installation and Licensing en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!