Suppose I have a database sitedb and in that I have 20 tables and a primary key(say uid) for one table is used in other tables as dependencies.
uid is of type int with length 10. Lets say that the number of entries in the table is full and I need to increase the capacity of the uid to the length 11.
Is it right to do so? What will happen to the related tables and how will it affect the relation?
What if I change the value of uid in all the tables to length 11. Is there a tool which will allow me to check and change the value of every related uid in all the tables in the database? Updates?
Tell me more
×
Database Administrators Stack Exchange is a question and answer site for
database professionals who wish to improve their database skills and learn from others in the community. It's 100% free, no registration required.
|
|
||||
| show 3 more comments |
|
Modify column by name(s):
you can also use any SQL
use group_concat or similar and just copy/paste. |
|||
|
|

int(10)does not mean capacity10. It means "allocate at least 10 chars for output." – ypercube May 30 '12 at 11:53int(10) unsignedmeans you can store numbers from0up to2^32 - 1which is a bit more than 4-billion. Is your table really full? – ypercube May 30 '12 at 12:09int(11)? – develkar May 30 '12 at 12:20UNSIGNED(as theint(10)suggests), you can modify it toint(11) unsigned. This has no effect on the data that is or can be stored inside the column and no effect on the Foreign Key dependencies. – ypercube May 30 '12 at 12:31