Link to home
Create AccountLog in
Avatar of devguru001
devguru001Flag for South Africa

asked on

How to delete after selection

Hi Experts

I need to make a deletion of a row that was selected within an inner select.

The idea is :
Select (select min(col) from tableA where tableA.ID = tableB.ID
 DELETE FROM tableA
WHERE tableA.ID = tableB.ID

) [colName]
From tableB

An alternate solution would too be highly appreciated

Thanks
Avatar of PortletPaul
PortletPaul
Flag of Australia image

any chance of using real table and field names?
plus, sample data & expected result?
Give us a data mockup of what you're trying to pull off here, as looking at your question it's not clear.
ASKER CERTIFIED SOLUTION
Avatar of PortletPaul
PortletPaul
Flag of Australia image

Link to home
membership
Create an account to see this answer
Signing up is free. No credit card required.
Create Account
COL exists in TableB? And is related to TableA.Col?