E
E
Evgeny Malinovsky2020-07-31 01:53:29
MySQL
Evgeny Malinovsky, 2020-07-31 01:53:29

Can I assign an id to each table?

I have a database, each table of which needs to be assigned an id column. How can I solve this problem? (Some table elements already have an id)

Answer the question

In order to leave comments, you need to log in

3 answer(s)
I
index0h, 2020-07-31
@index0h

Except as part of the name. But why?

D
Dr. Bacon, 2020-07-31
@bacon

For example, create another table with the id and the name of the tables, but it is better to first tell what problem you are solving.

A
Andrey Skorzhinsky, 2020-07-31
@AndyKorg

Use mySQL help, for example here
Write a script (utility) that iterates through the tables in the database, checks for the presence of a column named id and adds it if it is not there.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question