SQLTeam.com | Weblogs | Forums

A simple insert question

Hello,

I would like to insert some data into a table. I want to get the GameBankID's from another table and insert 2019-06-16 18:32:46.000 for expiryDate, "ABCD" for Pin and 12345 for Serial. How should I change the query below to accomplish what I want?

INSERT INTO GameBankPins(GameBankID,expiryDate, Pin, Serial)
SELECT GameBankID
FROM GameBanks
WHERE GameBankID > 1;

I think this works.

INSERT INTO GameBankPins(GameBankID,expiryDate, Pin, Serial)
    SELECT GameBankID, '2019-06-16 18:32:46.000' as expiryDate, 'ABCD' as Pin, '12345' as Serial
    FROM GameBanks
    WHERE GameBankID > 1;