±àдһ¸ö³ÌÐò¸ù¾ÝÄêÁäÅжÏÒ»¸öÈËÊDz»ÊǶùͯ(ÉèÒ»¸öÈ˵ÄÄêÁäÉÙÓÚ10ËêΪ¶ùͯ)
declare @age int
set @age=1
if @age<10
print '¶ùͯ'
else
print '²»ÊǶùͯ'
ÇëÎÊ¿ÉÒÔ×Ô¼ºÊäÈëageÂð£¿
ÎÒ²»ÖªµÀSQL Óï¾ä±à³ÌÓмüÅÌÊäÈëµÄÂ𣨱ÈÈçCÓïÑÔÖеÄscanf)
ûÓС£
µÄÈ·ÊÇûÓмüÅÌÊäÈëµÄ
д´æ´¢¹ý³Ì °Ñageµ±¸ö²ÎÊý´«²¼¾ÍÐÐÁË
create proc s
@age int
as
if @age<10
print '¶ùͯ'
else
print '²»ÊǶùͯ'
exec s '9'
ûÓÐ..
¿¿£¬¡¡°Ñ£ó£ñ£ìµ±±à³ÌÓïÑÔÁË¡£¡¡
¡¡£ó£ñ£ì£½¡¡£ó£ô£ò£õ£ã£ô£õ£ò£å¡¡£ñ£õ£å£ò£ù¡¡£ì£á£î£ç£õ£á£ç£å¡¡
¿ÉÒÔʹÓô洢¹ý³Ìѽ
ÈçÏ£º
SQL code:
create proc prcIsChild
@age int
as
begin
if @age<10
print '¶ùͯ'
else
print '²»ÊǶùͯ'
end
ÄÇÈç¹ûд´æ´¢¹ý³ÌÒªÇóÊäÈë²ÎÊý°ÑѧÉú´Óxs,kcºÍxk±íÖвéѯ³öÕâЩѧÉúѧºÅÐÕÃû£¬ÒÔ¼°ËùÑ¡µÄ¿Î³ÌÃûºÍ³É¼¨
ÕâÑùд¶ÔÂð£¿
create proc test_proc2
as
select xs.xh,xsxm,kcm,cj from xs,kc,xk
exec test_proc2 ' ',' ',' ',' ' --¡® ¡¯ÀïÃæÊÇд¾ßÌåµÄ²ÎÊý£¬ÎÒûд
Ïà¹ØÎÊ´ð£º
sqlµÄÈí¼þÔÚÄÄÀï¿ÉÒÔÏ°¡£¡ÔÚÍøÉÏÕÒÁËÂù¶à¶¼Óò»ÁË°¡
Ëæ±ã¸ãÒ»D°æ°É£¬
ѸÀ×µÚÒ»¸ö¾Í¿ÉÒÔÓÃ
2000,2005¶¼ÕâÑù
http://119.147.41.16/down?cid=0698C2D64D7D637D90A6D2482298E6717D4F15CD&t=2&fmt=-1 ......
ÈçºÎÔÚSQL2005ÖÐÉ趨¶¨Ê±×÷Òµ£¬±ÈÈç˵¶¨Ê±ÇåÀíijЩ±íµÄÊý¾Ý£¬
»òÕßÊǶ¨Ê±µÄ½«Ä³Ð©±íµÄÊý¾Ýµ¼³öexcel£¡
ÔÚÏߵȴý£¬¼±¼±¼±£¬×îºÃÊÇÏêϸ²½Ö裡
֮ǰÎÒ×öµÄ×÷ÒµÓеãÎÊÌ⣡
°ïUP
²Î¿¼:http://hi.baidu.com/toiota ......
tab1 ×Ö¶Î:billdate,goodsid,incount,inmoney,outcount,outmoney,endprice,endcount,endamt
tab2 ×Ö¶Î:goodsid,goodskind£¨ÉÌÆ·ÀàÐÍ£©
tab3 ×Ö¶Î:goodskind£¨ÉÌÆ·ÀàÐÍ£©,kindname
½á¹û£º
µÃµ½ÉÌÆ·ÀàÐÍÔÚÒ»¶Îʱ¼ä ......
±íÊý¾Ý
COL1 COL2 COL2 COL4 COL5
----------------------------------------------------------------------------------------------
2010-05-05 00:00 ......
ÎÒµÄ×÷ÒµÊÇÿ·ÖÖÓÖ´ÐÐÒ»´Î
ʱ¼ä³¤ÁË»áºÜ´óÂð£¿Ó°ÏìsqlµÄÔËÐÐÂð£¿
ÓÐʲôÓÅ»¯°ì·¨Âð£¿
-- ÄÇÒª¿´ÄãÊÇʲôÑùµÄ×÷ÒµÂÔÚÓÅ»¯µÄͬʱÄÜ·ñÂú×ãÄãµÄ¾ßÌåÐèÇóÂ
-- ¾¡ÎÊһЩ¹ÖÎÊÌ⣬ҲÀµµÃ°ÑÎÊÌâ˵¾ßÌåÒ»µã£¬µ±È˼ ......