资源描述:
《网页中SQL写法》由会员上传分享,免费在线阅读,更多相关内容在行业资料-天天文库。
1、查询分析器:Select*fromproductsASP网页:<%DimsqlstrSqlstr=”Select*fromproducts”%>查询分析器:select*fromproductswhereproid=’ca001b002p4’ASP网页:<%Dimsqlstr,vproidSqlstr=”select*fromproductswhereproid=’”&vproid&”’”%>查询分析器:select*fromproductswherenum>200ASP网页:<%Dimsqlstr,vnumSqlst
2、r=”select*fromproductswherenum>“&vnum%>查询分析器:select*fromproductswherepronamelike‘%中文%’ASP网页:<%Dimsqlstr,vkeywordSqlstr=”select*fromproductswherepronamelike‘%”&vkeyword&”%’”%>查询分析器:deletefromproductswhereproid=’ca003b001p000007’ASP网页:<%Dimsqlstr,vproidSqlstr=”del
3、etefromproductswhereproid=’“&vproid&”’”%>查询分析器:insertintoproducts(proid,proname,price,saleprice,propic,prosource,pronote,num,favbook,cat2id)values(‘ca003001’,’ASP案例’,23,33,,…..)insertintoproductsvalues(‘ca003001’,’ASP案例’,23,33,,…..)默认所有的字段值都必须依次赋值insertintoprodu
4、cts(proid,proname,price,saleprice)values(‘ca003001’,’ASP案例’,23,33)注意事项:可以空,不可以空ASP网页:<%Dimvproid,vproname,vprice,vsaleprice,vpronoteDimsqlstrSqlstr=”insertintoproducts(proid,proname,price,saleprice,pronote)values(‘”&vproid&”’,’”&vproname&”’,“&vprice&”,”&vsalepri
5、ce&”,’”&vpronote&”’)”%>查询分析器:ASP网页:查询分析器:ASP网页:查询分析器:ASP网页:查询分析器:ASP网页:查询分析器:ASP网页:查询分析器:ASP网页: