Hi @Josh
I usually write code like this:
IF OBJECT_ID('View_Stu_Scores')IS NOT NULL
DROP VIEW View_Stu_Scores
GO
CREATE VIEW View_Stu_Scores AS
SELECT UserName,Subject,Score
FROM StudentScores
WHERE Subject = 'Math'
GO
Best regards,
Cosmog Hong
If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our Documentation to enable e-mail notifications if you want to receive the related email notification for this thread.