I would strongly advise you move the SQL Command text which adds the column into a SProc in the database, then you can re-run without issues.
The SProc could look something like:
IF NOT EXISTS ( SELECT [COLUMN_NAME] FROM INFORMATION_SCHEMA.COLUMNS WHERE [TABLE_NAME] = 'Order Details' AND [COLUMN_NAME] = 'Order Details Value')
BEGIN
-- ALTER TABLE command here to add column
END
GO
Then when you re-run it, the IF NOT EXISTS will return false, and the SProc will end without attempting to add the column.
How to improve your code:
Your code which sets the 'Order details value' field could be improved, by writing the UPDATE command a separate SProc to perform the UPDATE.
I'm assuming you posted this code as part of a study topic, so the answer above will resolve for you, but I will suggest however you study the Computed Column type in SQL
The problem with your approach is that if you need to update that order details value field from another function, you will need to remember to call it from every possible point of code in your application! This can get tedious and repetitive. Imagine if you change the logic which decides if it needs updating? It will result in more code.
So, have a look at Computed Column.
Adding computed column:
In SQL Server Management Studio, right click table > Design > Add Column manually 'OrderDetailsValue' > Properties: set 'Computed Column Spec' to:
Quantity*UnitPrice
What this will do is perform the calculation on every row in that table and automatically update the field for you.
Another possible, and more efficient solution is to call SQL Command to set the Order Details Value when you insert a new Order row. For this you will need to set SQLParameters on the SQLCommand object.
All the best, hope it helps.