我有两个表这是一个确切的查询吗?
Inbox(id,accountid,emailfrom,emailsubject,emailbody,emaildate,attachment)
Trash(as above)
当用户希望从inboxDataGridView
删除一行,首先该行被复制到trash
表。我想这个查询先复制该行:
string query = "INSERT INTO Trash(inboxid, accountid, emailfrom, subject, emailbody,emaildate,attachment) SELECT inboxid, accountid, emailfrom, subject, emailbody,emaildate,attachment FROM Inbox WHERE(inboxid = " + accountinfo.PEmailId + ")";(where accountinfo.PEmailId = selectedRow value
但此查询给我一个错误。
请指导我如何做到这一点,复制和删除。
感谢它的工作 – buddy 2012-01-31 09:59:29