+ 1

Add values in a new column in a pre-existing table

Suppose I add a new column in a table and I have to add values to all of them at once. How can I do that? Using Update and Set command I am able to add only one at a time.

15th Mar 2018, 9:33 AM
Neha Jha
3 Respuestas
0
if same value need to update..you can update by update Customer set xyz = 123 where xyz = isnull
15th Mar 2018, 9:36 AM
Girish Vadera
Girish Vadera - avatar
0
Or set a Default value within the new column when creating it if you can. This will only work if it doesn't need to be different or unique for each row.
15th Mar 2018, 9:50 AM
ihateonions
0
No the values are different. Let’s say I have created a table named student and I need to add fees of the students. Using Alter command I add fees but how do I add different values for each student
16th Mar 2018, 8:20 AM
Neha Jha