idcustomers,firstname,lastname,address1,address2,city,state,zip,phone,email,cell,company,newid
307,Annaa,Mondet,"705 Congressional Rd.",,"Simi Valley",CA,93065,"(805) 300-3188",,,,1
308,Gayla,Lindquist,"2752 Sapra st",,"Thousand Oaks",CA,91360,"(805) 750-8429",,,,2
309,Suzie,Dotan,"4568 Winnetka Ave.",,"Woodland Hills",CA,91364,"(818) 346-1732",,,,3
310,Katie,Mulloy,"4024 Revello Pl.",,Moorpark,CA,93021,"(805) 390-7440",,,,4
311,,,"2935 Shadowbrook ave",,Westlake,CA,91361,,,,NULL,5
312,"Steve & Kimber",Foy,"2874 Chippewaare Ave",,"Simi Valley",CA,93063,"(805) 582-0851",,"(818) 292-4550",,6
313,Robert,Clarke,"17433 Smoke tree",,"Santa Clarita",CA,91387,"(661) 373-8922",,,,7
314,Brett,Bucciocco,"5266 Via Capote",,"Newbury Park",CA,91320,"(818) 599-8809",,,,8
315,Allan,Ray,"784 Holbertson Ct.",,"Simi Valley",CA,93065,"(805) 522-1412",area1@sbcgobal.net,,,9
316,John,Zahedi,"5122 Mammoth Ave.",,"Sherman Oaks",CA,91423,"(818) 501-5344",,,,10
317,Carmin,Appice,"26848 Marina Point Ct.",,Valencia,CA,91355,"(661) 367-4442",powerrock@sbc.gobal,"(661) 618-6201 Son cell",,11
318,Sam,han,"7433 Shadyglade Ave #3",,"North Hollywood",CA,91605,"(213) 700-9978",hanandkoo@yahoo.com,,,12
319,Rose,Lane,"6459 Deerbrook Cir.",,"Oak Park",CA,91377,"(818) 624-7673",,,,13
320,Eric,Scott,"3190 Dalhart Ave",,"Simi Valley",CA,93063,"(805) 501-0185",,,,14
321,Donna,Vella,"13021 E. Cloverdale",,Moorpark,CA,93021,,DV4Re.Aol,,NULL,15
idevents,title,start,end,allday,url,customerid,memo,dispatchstatus
13,"AA Meeting","2013-09-30 00:00:00","2013-09-30 00:01:00",false,,336,"AA Meeting",scheduled
14,"AA Meeting","2013-09-30 00:00:00","2013-09-30 00:01:00",false,NULL,307,"AA Meeting",scheduled
15,"AA Meeting","2013-09-30 00:00:00","2013-09-30 00:01:00",false,NULL,308,"AA Meeting",scheduled
我在客户中创建了一个名为 newid 的新主键。事件的idcustomers字段反映了customers中的idcustomers字段。我希望现在将事件的 idcustomers 字段更改为位于 newid 中的新值。我开始了一个查询,但它还没有工作......
更新事件集 events.customerid = customers.newid where events.customerid = customers.customerid;
这可以通过更新来完成吗?
提前致谢...