This is the query which is helpful to find in ur database which tables are foregin keys and which having Primary key
Constraint_Name AS [Constraint],
Table_Schema AS [Schema],
Table_Name AS [TableName]
Now This is the Stored Procedure which can delete ur table records
CREATE PROC USP_DeleteDataFromTables
DECLARE @Query NVARCHAR(50)
SET @Query ='DELETE FROM '+@TName
Here when u execute this stored procedue u have to just send a paramater value for ur table name for example u have employee_master table so u wright
EXEC USP_DeleteDataFromTables 'Employee_Master'
Now automatically when u press F5 all data will be removed from that table.
if u want any more suggestion u can contact me on firstname.lastname@example.orgRama Sagar, if this helps please login to Mark As Answer. | Alert Moderator