I have a table called UserInfo like this:
Userid Job Age
John A 35
Sarah B 27
and I want to create another table like this called UserScores (score is null):
Userid Score
John
Sarah
Where the userid column is the same exact as the other table. How would I do this with SQL? This is what I tried:
CREATE TABLE UserScores AS
SELECT userid, score
FROM user
I need the userid to be the primary key in my UserScores table as well. How would I do this? Thanks in advance.