Hi Walter, You can also import data from a text file with comma-separated fields using Derby's SYSCS_UTIL.SYSCS_IMPORT_DATA() built-in procedure...
CREATE TABLE TAB1 (c1 VARCHAR(30), c2 INT) CALL SYSCS_UTIL.SYSCS_IMPORT_DATA (NULL, 'TAB1', null, null, 'myfile.del',null, null, null, 0) With myfile.del containing data sych as: Robert,1 Mike,2 Leo,3 More info at: http://db.apache.org/derby/docs/10.4/tools/tools-single.html#ctoolsimport16245 You can also create a table out of another existing table and specify which (if not all) columns you want to have: CREATE TABLE TAB1 AS SELECT c1, c2 FROM TAB3 WITH NO DATA; You can find a list of Derby's SQL commands in the Reference guide: http://db.apache.org/derby/docs/10.4/ref/ref-single.html Cheers --francois On Mon, Mar 2, 2009 at 3:40 PM, Walter Rogura <[email protected]> wrote: > Hi, > > is there a COPY command applicable in derby? I know this from > PostgreSQL, e.g. > COPY table (column1, column2) FROM stdin; > c11 c12 > c21 c22 > c31 c32 > \. > > I tried it with SQuirreL but had no success. Btw. where do I find a > reference of supported SQL commands in derby? > > Thank you very much, > Walter >
