Quantcast
Channel: SQLServerCentral » SQL Server 2014 » Development - SQL Server 2014 » Latest topics
Viewing all articles
Browse latest Browse all 3145

Delete Row from one table if other table with multiple rows meet the condition

$
0
0
Hi I have 2 Tables as below , I need to delete TableA row with ConsumerID = 99 as my condition would be to delete the rows in Table A if DeleteFlag in Table B is 1 for the columns ConsumerID and Product Can some one help me deleting the Table A With Consumer ID = 99 with sql scriptthanks in Advance :)Table A : ConsumerID, xxxx, AAAAA, BBBB99 1 2 3100 2 3 4Table B : ConsumerID, Product, DeleteFlag, dddd99 1 1 499 2 1 5100 1 0 6100 5 1 3

Viewing all articles
Browse latest Browse all 3145

Trending Articles