on 10-26-2007 11:55 AM
Hi all,
1. is there a max integer value, when we create/add a column of type INTEGER?
if yes,
2. what happens when column value reaches that value?
- does it starts from 1 again or what happens?
Because, i want to create a table with a column of type INTEGER and it is enabled with auto increment and it is primary key. If i delete all rows(say, 100 rows) and insert values into it, it starts with 101... so i was wondering whether it starts with 1 again? or i should change the type of the column to some other type(VARCHAR()).
thank you,
regards,
sudhir.
hi
try this sentence:
ALTER TABLE schemaname.tablename COLUMN colname DROP DEFAULT;
this eliminate default value and this recreate that value
ALTER TABLE schemaname.tablename COLUMN colname ADD DEFAULT SERIAL (integer value);
good luck
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
81 | |
10 | |
10 | |
9 | |
7 | |
6 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.