|
Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com |
RE: Migration problem - where is ADD columnName AFTER command?
From: Zabach, Elke (elke.zabach
sap.com)
Date: Thu Jul 03 2003 - 02:24:07 CDT
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
dhay
lexmark.com wrote:
>
> Hi,
>
> We're writing some migration code to update our database to a
> new version
> of our code.
>
> We need to add some columns, but insert them after a
> particular column in
> the table because we use "INSERT INTO table VALUES (...)" statements,
> necessitating that the columns be in the right order.
>
> I know that mysql has an "ADD column AFTER currColumn" in
> their ALTER TABLE
> syntax. How do we do this in SAP?
>
ADD column AFTER is not available in SAP DB.
The only way is to
- rename the old table
- create the new one with the wanted columns in the wanted ordering
- insert into new table select from old table (or do the last two steps in one)
- do not forget to grant privs, create views, create indexes, create synonyms
for the new table with the old name
Elke
SAP Labs Berlin
_______________________________________________
sapdb.general mailing list
sapdb.general
listserv.sap.com
http://listserv.sap.com/mailman/listinfo/sapdb.general
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]