I have a database {TABLE t( num integer, date text );} file, and a bbb.sql file 
content:

INSERT INTO "t" VALUES(1,'1/1/2011');
INSERT INTO "t" VALUES(2,'1/1/2011');
INSERT INTO "t" VALUES(2,'2/1/2011');
INSERT INTO "t" VALUES(3,'1/1/2011');
INSERT INTO "t" VALUES(3,'2/1/2011');
INSERT INTO "t" VALUES(3,'3/1/2011');
INSERT INTO "t" VALUES(5,'7/1/2011');

DELETE FROM t WHERE rowid NOT IN (
SELECT rowid FROM
    ( SELECT rowid, num, date FROM t ) CROSS JOIN
    ( SELECT num min_num, min( date ) min_date FROM t GROUP BY num ) ON
    num=min_num AND date=min_date
);

I want to run the bbb sql file in command ,how to write command in c or c++ or 
console command line?
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to