So I'm supposed to take the last two digits from the phone number, and insert it into a new column in the same table.
I'm currently getting this error:
Msg 515, Level 16, State 2, Line 1
Cannot insert the value NULL into column 'Pass_id', table 'lunches.dbo.passenger'; column does not allow nulls. INSERT fails.
The statement has been terminated.
This is the query I'm using to get this error:
INSERT INTO dbo.passenger (age)
SELECT
RIGHT(phone, 2)
FROM dbo.passenger