I'm CaLendarW Blog

Update Statement with Other Table

by on Apr.23, 2009, under coding snippet

呢排為設置 Testing 場而預備緊 d SQL statement, 有部份 Data 得 detail table, 但使用時要整返個 master 比佢, 所以就要使用 update statement 黎 link 返唔同 table 既 key, 以下係一個例子:

update tblModel
set series_pkey = tblSeries.pkey
from tblModel, tblSeries
where tblSeries.full_name = 'A Series' and tblModel.full_name like 'A %';
:

Leave a Reply

You must be logged in to post a comment.

Looking for something?

Use the form below to search the site:

Still not finding what you're looking for? Drop a comment on a post or contact us so we can take care of it!