I have a client table and would like to create a support table to avoid creating many columns (address, phone, telephone1, email, email1, email2, car nameplate, mother name, etc.).
The support table consists of the customer code, field and value.
Example:
Cliente: 1
Campo: placa_do_carro
Valor: ABC-1234
What kind of data should I use in the "value" column so I can save everything? (schematic below)
I'm confused because this table can enter income that would normally be a float
and car card that would be a varchar
.
Structure:
Table: customer
cliente_cod cliente_nome cliente_email
1 José Silva [email protected]
Support table: client_fields
INT VARCHAR(20) ????
cliente_cod campo valor
1 placa_carro ABC-9329
1 apelido Zezinho
1 renda 5.0000