There are two tables [UserData] and [HotelData] I\'ve linked them with a foreign key. which is \"Username\" and I want to delete which
There is no need to write any code to delete data on the child table when you delete a record from the UserData table. Just use Cascade delete behavior. It means that if a record in the parent table is deleted, then the corresponding records in the child table will automatically be deleted.
Do the following steps:
Like the following image: