Helpful Information
 
 
Category: MySQL and other databases
Max. Columns & Foreign Keys

How many maximum columns we can add in one table and how many maximum foreign keys we can use in one table?

Hi

It purely depends upon the database you are using. This differ from database to database. I mean the number of fields in a table.

We can have n number of foreign keys in a table theoritically. Practically rather it would be the total number of fields allowed in a table.

Though databases allows us to have large number of fields we used to reduce the number of fields for the sake of flexibility, consistency, concurrencry, etc.

We can apply Normalization principles on our tables and split a big table into a number of tables and relate them using foreign keys.

hope this will help you

Regards

Code Exploiter










privacy (GDPR)