title: Can I insert data to a column in 3 different tables?
body: <p>This is my code. I have 3 tables named</p>
  
  <p>accounts, WaterDB, ElectricDB and GasDB.</p>
  
  <p>-In the code below i insert information to the acounts table.</p>
  
  <ul>
  <li><p>In my accounts, WaterDB, ElectricDB and GasDB, I have a column called username. </p></li>
  <li><p>Is it possible for me to insert the username into the other tables 'username' column as well?</p></li>
  </ul>
  
  <p>Code where i insert information to my accounts table:</p>
  
  <pre><code>protected void registerBtn_Click1(object sender, EventArgs e)
      {
          try
          {
  
              SqlConnection conn = new SqlConnection(ConfigurationManager.ConnectionStrings["userDatabaseConnectionString1"].ConnectionString);
              conn.Open();
              string insertQuery = "insert into accounts (username,email,password,postalcode,role) values (@Uname ,@email ,@pswd ,@pstlc,@role)";
              SqlCommand com = new SqlCommand(insertQuery, conn);
              com.Parameters.AddWithValue("@Uname", registerUsernameTB.Text);
              com.Parameters.AddWithValue("@email", registerEmailTB.Text);
              com.Parameters.AddWithValue("@pswd", registerUserPswdTB.Text);
              com.Parameters.AddWithValue("@pstlc", postalCodeTB.Text);
              com.Parameters.AddWithValue("@role", role.Text);
  
              com.ExecuteNonQuery();
              Response.Redirect("Loginx.aspx");
              Response.Write("Registration is successful");
  
              conn.Close();
  
          }
  </code></pre>