Is there any alter table (or any other sql) command that can be used to alter the datatype of a integer column to bigint? I have a bunch of tables in a shared environment all of which have data and I need to update the datatype for one column in all of these tables. I could not find a sql so I've been using the usual procedure of creating a new table, copying over data and replacing the old table - just wondering if there is an easier way out.
That can't be done with a single ALTER TABLE command. The SQL manual is your friend. See the topic "Rules for Changing the Column Data Types" and "Procedure to Change Column Data Types" in the section on ALTER TABLE.