sql 克隆数据(不用循环克隆)

 
        public int Copy表(int t1, int t2)
        {
            string strSql = string.Format(@"
            insert into [表]
            SELECT 
                   {0}
                  ,[a]
                  ,[b]
                  ,[c]
                  ,[d]
                  ,[e]
                  ,[f]
                  ,[j]
                  ,[f]
                  ,[i]
              FROM [表]
              where id={1}
            ", t1, t2);

            int count = SqlHelper.Insert(SqlHelper.connstr, CommandType.Text, strSql, null);
            return count;
        }

你可能感兴趣的:(sql 克隆数据(不用循环克隆))