Execute more sql statments in one step.



I've this script:

DROP TABLE IF EXISTS `rivenditori`;

CREATE TABLE `rivenditori` (
  `id` varchar(255) NOT NULL default '',
  `ragione_sociale` varchar(255) default NULL,
  `licenza` varchar(255) NOT NULL default '',
  `ultimo_accesso` timestamp NULL default NULL,
  PRIMARY KEY  (`id`,`licenza`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 ROW_FORMAT=DYNAMIC;


INSERT INTO `rivenditori` VALUES ('101010','aaa','blabla',NULL); INSERT INTO `rivenditori` VALUES ('101010','aaa','bbbb',NULL); INSERT INTO `rivenditori` VALUES ('333','ccc','333-223',NULL); INSERT INTO `rivenditori` VALUES ('partita','ragiones','s',NULL);

and i need to execute it into a mysql database in one step.
But i obtain an exception: "You have an error in your SQL syntax;", and, cutting and pasting the same script inside a mysql front end (mysqlfront for example) it's executed with no errors.


Have i to use a specific method to run multiple instructions? I've tried execute, executeBatch() but the results are the same...
.




Relevant Pages

  • Re: Execute more sql statments in one step.
    ... `id` varcharNOT NULL default '', `ragione_sociale` varchardefault NULL, `licenza` varcharNOT NULL default '', `ultimo_accesso` timestamp NULL default NULL, PRIMARY KEY ... INSERT INTO `rivenditori` VALUES; ... and i need to execute it into a mysql database in one step. ... I've tried execute, executeBatchbut the results are the same... ...
    (comp.lang.java.databases)
  • Re: Execute more sql statments in one step.
    ... `id` varcharNOT NULL default '', `ragione_sociale` varchardefault NULL, `licenza` varcharNOT NULL default '', `ultimo_accesso` timestamp NULL default NULL, PRIMARY KEY ... INSERT INTO `rivenditori` VALUES; ... and i need to execute it into a mysql database in one step. ... I've tried execute, executeBatchbut the results are the same... ...
    (comp.lang.java.databases)
  • Re: Combining two row into one
    ... So you will have to remove the primary key from the SELECT ... iam trying to make a query which will return 1 row with n+n columns ... VB & then execute it.... ... Trust iam clear. ...
    (microsoft.public.access.queries)
  • How to get the primary key back after you done a single line insert?
    ... field MYPK which is an autogenerated primary key. ... Dim MyConn As New SqlClient.SqlConnection ... The execute scalar was supposed to return the first ...
    (microsoft.public.dotnet.languages.vb)
  • Re: Jet.OLEDB and Access 2003
    ... It does have a primary key. ... As for the permission, it's ... > requires at least Read, Write, eXecute and Delete. ... >> I'm running an old ASP program that worked just fine w/ Access 2000 ...
    (microsoft.public.vb.database)