Answer the question
In order to leave comments, you need to log in
How to add a populated field to a finished sql table?
There is a table from one field, already filled. How to add an ID field to it with a key, an identifier that will automatically fill in to those lines that have already been entered, and, of course, automatically filled in when new brands are added?
MARK | ID
--------------------
Nissan | 1
subaru | 2
Toyota | 3
Tried via alter table marki add id int not null primary key
This adds a field but the values of already existing rows are null
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question