Possible to do INSERT with some columns from SELECT query and some columns with specific values

oracle

Is it possible to do an one INSERT statement where some values are from a SELECT query and some from specific values?

Trying to do something like this where cust_id, rep_id are from a select query and sku_ordered is a specified value:

    INSERT into ORDERS (cust_id, rep_id, sku_ordered='ABC123') 
     SELECT id, 
            sales_rep 
     from CUSTOMERS 
     where cust_name = 'ABC Corp';

Best Answer

Literal must be a column in output list simply:

INSERT into ORDERS (cust_id,   rep_id , sku_ordered) 
SELECT                id   , sales_rep,   'ABC123'
from CUSTOMERS 
where cust_name = 'ABC Corp';