You want:
insert into prices (group, id, price)
select
7, articleId, 1.50
from article where name like 'ABC%';
where you just hardcode the constant fields.
More Related Contents:
- Join vs. sub-query
- Solutions for INSERT OR UPDATE on SQL Server
- Inserting multiple rows in a single SQL query? [duplicate]
- How do I use an INSERT statement’s OUTPUT clause to get the identity value?
- SQL Server: Is it possible to insert into two tables at the same time?
- SQL Joins Vs SQL Subqueries (Performance)?
- Difference between CTE and SubQuery?
- updating table rows in postgres using subquery
- Does SparkSQL support subquery?
- Is there a performance difference between CTE , Sub-Query, Temporary Table or Table Variable?
- subquery in FROM must have an alias
- PostgreSQL multi INSERT…RETURNING with multiple columns
- Return pre-UPDATE column values using SQL only
- Can you access the auto increment value in MySQL within one statement?
- How to delete from select in MySQL?
- Difference between Subquery and Correlated Subquery
- SQL speed up performance of insert?
- SQL Server: Cannot insert an explicit value into a timestamp column
- SQL Server 2008 – Help writing simple INSERT Trigger
- Export specific rows from a PostgreSQL table as INSERT SQL script
- postgresql: INSERT INTO … (SELECT * …)
- Oracle insert if row does not exist
- What is the difference between a LATERAL JOIN and a subquery in PostgreSQL?
- Nested select statement in SQL Server
- Postgres Error: More than one row returned by a subquery used as an expression
- Oracle: Combine multiple results in a subquery into a single comma-separated value [duplicate]
- SQL Oracle LEFT JOIN and SUBQUERY error: ORA-00905: missing keyword
- SQL – Inserting a row and returning primary key
- How do I perform update query with subquery in Access?
- How to insert Arabic characters into SQL database?