title: Insert Stored procedure to insert data into two tables at a time in SQL Server 2008
body: <p>How to write a SP for SQL Server 2008 to insert data into two tables </p>
  
  <p><code>Login(username,password,id)</code> and <code>UserInfo(id,first_name,last_name,phone_no,email,address,IsActive)</code>.</p>
  
  <p><code>UserInfo</code> table requires that <code>id</code> should be entered which will be automatically generated in Login table while inserting new record. How should I construct this SP please guide me.  </p>