Hello ALL,
I have the two tables;
Code:
t1
DocID Word TitleWord
1 book 0
1 read 0
1 open 0
2 computer 0
2 book 0
3 paper 0
3 desk 0
t2
DocID Word Tag
1 book noun
2 computer noun
I would like to update the t1.TitleWord field according to the table t2.
Code:
t1
DocID Word TitleWord
1 book 1
1 read 0
1 open 0
2 computer 1
2 book 0
3 paper 0
3 desk 0
I want to use the following statement
Code:
UPDATE t1, t2
SET
t1.TitleWord = '1'
WHERE
t1.DocID = t2.DocID AND t1.Word = t2.Word
I wonder if this statement is correct.