I created a table called Dummy
with 4 columns: Date, Year, Student_Names, Subject
.
After a few days I need to add one more column name called Marks
.
I know how to add column Marks
by using the SQL query, I am using the query below:
Alter Table Dummy
add Mark varchar(30)
After I add the column, all values are NULL, I need some value in the place of NULL.
How do I add those values? Values are mentioned in an Excel file.
Try,
Alter Table Dummy ADD Mark varchar(30) DEFAULT ''
or
UPDATE Dummy
SET [MArk] = 'new value'
your code is update Dummy set Marks = 10 where Student_Names = name you want to add marks to
like this you can add marks to all the students
good luck
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With