我有一个包含 ID、departmentID、val 列的表
create table departmentVal (ID INT IDENTITY(1,1), departmentID INT NOT NULL, val BIGINT)
create table departmentID (ID,departmentName)
如何将 val、$count = 10k 和 $val = 1234900000001 多次插入到 departmentVal 中到 1234900010000
$i = 0;
$count = 10000;
$va = 1234900000001;
$dptID = 1;
while ($i < $count){
insert into departmentVal($dptID , $val);
$val++;
}
我正在寻找更好的解决方案来做到这一点。