6年代码案例见证我的成长

版权声明:本文为博主原创文章,未经博主允许不得转载。联系QQ:1254584012 https://blog.csdn.net/wendi_0506/article/details/71514182

刚毕业这么写代码
for(int i=1;i<=100;i++)
{
dataset =”select * from tbname where id =”+i;
}

第二年这么写代码
dataset = “select * from tbname where id in(1,2,3,….,100)”;

第三年这么写代码
dataset = “select username,password from tbname where id in(1,2,3,….,100)”;

第四年这么写代码

create proc=”select username,password from tbname where id in(‘”+参数+”’)”;
dataset = “exec proc(1,2,3,….,100)”;

第五年这么写代码

创建一个内存表,数据为select username,password from tbname where id in(1,2,3,….,100)

代码直接从内存读取出来

第六年不知道该如何优化了……………….

猜你喜欢

转载自blog.csdn.net/wendi_0506/article/details/71514182
今日推荐