title: insert and update sql statement in single sql statement
body: <p>I want to create insert and update sql statements in single statement. But insert statement is for one table and update statement for another table...</p>
  
  <p>this is Appliance_Location table</p>
  
  <pre><code>CREATE TABLE [dbo].[Appliance_Location] (
  [Appliance_Id]  NCHAR (10)    NOT NULL,
  [RoomId]        NVARCHAR (20) NOT NULL,
  [ApplianceName] NCHAR (10)    NOT NULL,
  [AddDate]       DATE          NULL,
  CONSTRAINT [PK_Appliance_Location] PRIMARY KEY CLUSTERED ([Appliance_Id] ASC)
  </code></pre>
  
  <p>);</p>
  
  <p>and this is Appliance_Count table</p>
  
  <pre><code>CREATE TABLE [dbo].[Appliance_Count] (
  [RoomId]   NVARCHAR (20) NOT NULL,`enter code here`
  [Bulb]    INT           NOT NULL,
  [Fan]     INT           NOT NULL,
  [AC]       INT           NOT NULL,
  [Computer] INT           NOT NULL,
  CONSTRAINT [PK_Appliance_Count] PRIMARY KEY CLUSTERED ([RoomId] ASC)
  </code></pre>
  
  <p>);</p>
  
  <p>when I insert an appliance to the Appliance_Location table then count of that particular appliance in Appliance_Count table should be updated</p>