Subscribe to this thread
Home - General / All posts - insert update on new column
lionel

995 post(s)
#11-Jan-18 16:51

Hi

Can we do using SQL9 for insert new data ( and so new column ) that don't exist be condifdent that manifold ll create those automatially for us OR do we need to create the column ( using schema) before use those kinds of query statement ?

In a way in manifold 8 we can copy table content to another table and manifold manage / create the new column in the target table for us in background ( implicit) if those column don't exist !

Does this behaviour in manifold 8 gui ( copy /paste) could also occur in Manifold 9 for SQL9 ?.

Ok i can simply test by my own ..... update ( select ) ....

Regard's


Book about Science , cosmological model , Interstellar travels

Boyle surface fr ,en

adamw


10,447 post(s)
#12-Jan-18 08:18

Yes, you can add a new field to a table using SQL.

Example:

--SQL9

CREATE TABLE t (mfd_id INT64INDEX mfd_id_x BTREE (mfd_id));

ALTER TABLE t (ADD f INT32);

The first statement creates a table, the second adds a new field.

You can use this with tables stored in a MAP file or with tables stored on a different data source. In the latter case, if you are running the query using 9's query engine, 9 will translate the syntax for that other data source as necessary.

We do not currently add fields during copy / paste. We might allow doing this in the future.

Manifold User Community Use Agreement Copyright (C) 2007-2021 Manifold Software Limited. All rights reserved.