如何在两个表中插入相同的值

我有具有相同属性的Employee和CT Employee SQL表 我想如果我在CT EMPLOYEE表中添加一个值,那么该值将添加EMPLOYEE表 我该怎么办?

class Program
            {
                static void Main(string[] args)
                {
                    SqlConnection connect = new SqlConnection();
                    connect.ConnectionString = "Data Source = .; Initial Catalog = DigitalizationDeneme; Integrated Security = true";
                    SqlCommand con = new SqlCommand("UPDATE",connect);
                    connect.Open();
                Console.WriteLine($"Connection State : {connect.State}");
                var saveNumber = con.ExecuteNonQuery();
                Console.WriteLine(saveNumber);

                Console.ReadLine();
     }
        }
    }
    Employee.cs  

        class Employee
        {
            public int EmployeeID { get; set; }
            public string Email { get; set; }
            public string Gid { get; set; }
            public string FirstName { get; set; }
            public string LastName { get; set; }


            public string CostCenter { get; set; }

            public DateTime StartDate { get; set; }
            public DateTime LeaveDate { get; set; }
            public string ContractType { get; set; }
            public double WeeklyWorkingHour { get; set; }
            public int MenagerID { get; set; }
            public string scdDept { get; set; }
            public string SapCompanyCode { get; set; }
            public string status { get; set; }
            public DateTime LastUpdatedTime { get; set; }


        }
    }

    ctemployee cs
        class ctEmployee
        {
            public int EmployeeID { get; set; }
            public string Email { get; set; }
            public string Gid { get; set; }
            public string FirstName { get; set; }
            public string LastName { get; set; }


            public string CostCenter { get; set; }

            public DateTime StartDate { get; set; }
            public DateTime LeaveDate { get; set; }
            public string ContractType { get; set; }
            public double WeeklyWorkingHour { get; set; }
            public int MenagerID { get; set; }
            public string scdDept { get; set; }
            public string SapCompanyCode { get; set; }
            public string status { get; set; }
            public DateTime LastUpdatedTime { get; set; }


        }
    }

我希望是否在员工表中看到的相同值的数据库中添加值CTEMPLOYEE 请帮助我,我需要快速的帮助。

lz245548622 回答:如何在两个表中插入相同的值

暂时没有好的解决方案,如果你有好的解决方案,请发邮件至:iooj@foxmail.com
本文链接:https://www.f2er.com/3159917.html

大家都在问