Doubt Mysql bank

Asked

Viewed 30 times

0

In this database and I’m not getting it done:

I have it:

 value_id | entity_type_id | attribute_id | entity_id | value
 600      | 2              | 22           | 40        | Gaga
 601      | 2              | 20           | 40        | Tonha

and I’d like to turn it into

 value_id | entity_type_id | attribute_id | entity_id | value1  | value2
          |                |              |           | Gaga    | Tonha

The rest of the fields that are blank, for me it does not matter or not

1 answer

0

To add the value2 column in the table :

ALTER TABLE suatabela ADD value2 varchar(255)

Once this is done, you can enter your data this way: Ex:

INSERT INTO suatabela VALUES(600,2,22,40,'Gaga','Tonha');

Browser other questions tagged

You are not signed in. Login or sign up in order to post.