All Forums Database
rohit.lalwani1 8 posts Joined 08/13
27 Jun 2014
Data Type Conversion BIGINT to INTEGER

I want to change  the datatype of few columns in one table from BIGINT to INTEGER. (Table is not Empty)
Is there any Alter Table statement or i have to used new table and then copydata and rename ??
Please suggest

hvganipineni 14 posts Joined 09/09
27 Jun 2014

Its always better to create a new table and then copy the data.

Harsha Ganipineni

LUCAS 56 posts Joined 06/09
29 Jul 2015

Replacing BIGINT with INTEGER in new tables: some issues in joins ?
About changing datatype from now when creating new tables for an application existing column (ID_COL):
i just wonder wether a use of INTEGER instead of BIGINT could impact join performances between historical tables and new tables ?
Well, except the fact a same column with two datatypes is not suitable in a physical model ...
NB: BIGINT is a waste of space when ID value is never above 110 000 000 and tables count some 50 billions lines.

You must sign in to leave a comment.