SQL insert with select and hard-coded values
INSERT INTO Movies (Title, Director, Cost, Profits)
SELECT 'Star Wars', name, 50000, 1000000
FROM Directors WHERE name = 'Lucas'
Because you can specify hardcoded values in the select
statement, it's probably cleaner to use:
insert into movies (title, director, cost, profits)
select 'Star Wars', name, 50000, 1000000 from directors where name = 'Lucas';