我想要使用union插入但是它不能使用sqlite3,任何帮助将不胜感激:
INSERT INTO
eventssubs(eventid,eventname,eventdate,Firstname,LastName,MobileNumber)
SELECT
eventid,eventname,eventdate FROM events where eventname='my'
UNION
SELECT
FirstName,LastName,Number1 FROM Records where id=1
给出[6列的3个值]
答案 0 :(得分:1)
您可以尝试这样的事情:
INSERT INTO
eventssubs(eventid,eventname,eventdate,Firstname,LastName,MobileNumber)
SELECT
eventid,eventname,eventdate, FirstName,LastName,Number1
FROM events, records
where
events.eventname='my' and
records.id=1