799424 wrote:From which rows? Do you mean you only want values of a.y1 that are different from any value of b.y2, or do you mean just for some related rows? If the latter, what rows are related? Do a.x1 and b.x2 have something to do with this?
i have THREE Tables , TABLE A has two columns X1 & Y1 , Table B has X2 & Y2 AND TABLE C WITH Z1 column . i want a procedure which compare COLUMNS A.Y1 and B.Y2 columns ,
if column Y1 is diffrent than Y2(VALUE WILL BE CHARCHTERS like yes,NO,null) then i have to insert the same value of Y1 t0 table C OF COLUMN Z1 .if the values are same ignore .If one of the vlaues is NULL and the other is not, do you want to consider thme the same?
INSERT INTO c (z1) SELECT a.y1 FROM a JOIN b ON a.xi = b.x2 WHERE LNNVL (a.y1 = b.y2) ;