mysql ²éѯ - MS-SQL Server / Ó¦ÓÃʵÀý
±íproduct
ÓÐ×Ö¶Î
record_id pro_no
1 1AD00001
2 1AD00002
3 1AD00003
4 1AD00004
.
mysqlÓï¾ä ÈçºÎʵÏÖ ²éѯpro_no ´Ó1AD00001 µ½1AD00003µÄ¼Ç¼{{
Ïà¹ØÎÊ´ð£º
ÎÒÓÐÒ»¸ö±í£¬½á¹¹ÊÇÕâÑù¡£
ת³ö µ¥Î» תÈ뵥λ ±ÊÊý ½ð¶î
date(Ö÷) outid(Ö÷) inid(Ö÷) num amt
2009 1 2 1 500 Ϊ 1 µ¥Î» ÔÚ2009Ä ......
tab1 ×Ö¶Î:billdate,goodsid,incount,inmoney,outcount,outmoney,endprice,endcount,endamt
tab2 ×Ö¶Î:goodsid,goodskind£¨ÉÌÆ·ÀàÐÍ£©
tab3 ×Ö¶Î:goodskind£¨ÉÌÆ·ÀàÐÍ£©,kindname
½á¹û£º
µÃµ½ÉÌÆ·ÀàÐÍÔÚÒ»¶Îʱ¼ä ......
1¡£ÔõÑùʹxp_cmdshellÄÜÍêÕûÊä³ö³¬¹ý255¸ö×Ö·ûµÄ×Ö·û´®¡£
2¡£select ʱ£¬¼ìË÷ËÙ¶ÈÊÇÓëfromºóµÄ TABLE˳ÐòÓйأ¬»¹ÊÇÓëwhereÌõ¼þµÄ˳ÐòÓйØ(TABLEÊý¾Ý¶àÉÙ )
ÔÚϵͳÊôÐÔÉ趨ÀïÓиöÑ¡Ïî,¿ÉÒÔÐ޸ĵ¥×Ö¶ÎÊä³ö×ÖÊýÏÞÖÆ. ......
1¡¢ÊDz»ÊÇPHPÖÐÖ»ÄÜʹÓÃmysql_query("update user_aa set money=money2-".$bpanmm." where uid=".$userppp);¸üÐÂÊý¾Ý£¿£¿£¿
2¡¢PHP¸üÐÂmysql_fetch_row($res)Óëmysql_fetch_array($res)ÖеÄÊý¾ ......
sp ³ÌÐò
delimiter //
create procedure ma()
begin
declare i int default 0;
while i<11 do
set i=i+1;
select i;
end while;
end //
delimiter ;
1+2+...+9+10
ΪʲôÕâ¸ö³ÌÐòÎÞ·¨ÊµÏÖÀÛ¼ÓЧ¹û
/ ......