_:n4d11b2d9681741abac0ae246771d2da4xb2
<http://schema.org/text>
"Hi  nagaraju60Refer below sample querySQLCREATE PROCEDURE CheckAndIpdate\tItemId INT\tOrderId INTASBEGIN\tDECLARE Id INT\tSELECT Id  FKorderId FROM TblItms WHERE ItemId  ItemId AND FKorderId  OrderId\t\tUPDATE TblItms SET ItemStatus  39C39 WHERE ItemId  ItemId AND FKorderId  OrderId\t\tUPDATE TblOrdrs SET OrderStatus  39C39 WHERE OrderId  IdEND"
<https://www.aspsnippets.com/questions/415658/Update-Primary-Table-and-records-having-dependencies-in-SQL-Server/>