Compose “Insert…Select…Where” query
问题 I'm trying to compose a query using Slick 3.0, but can't seem to figure it out. The equivalent SQL is "insert into SavedMail select * from Inbox where Inbox.id = 1" val mailTable = TableQuery[Tables.Inbox] val savedMailTable = TableQuery[Tables.Savedmail] val select = mailTable.filter(_.id === msgId) I'm stuck on how to do the insert now. Help appreciated. 回答1: Here's a solution I've come up with. Perhaps there's a way to not use forceInsertQuery, but hey, this works. val mailTable =