Bài tập thực hành môn cơ sở dữ liệu

4 403 0
  • Loading ...
1/4 trang

Thông tin tài liệu

Ngày đăng: 28/03/2014, 20:55

Tài liệu thực hành môn CƠ SỞ DỮ LIỆU Mục tiêu: !"#$$%"&'()*+$),"-)./012+".134+.5 678.13++"*9:.13#$$;(+#<:=>#<?+@+A *-.B4+#$$C+"SELECT vFirstName, vLastName, vEmailIdFROM Shopper678,DEF.B*-&G 8,D EF:*7./0*B<&*+$),"C./0.CH 8,D EF.B&$I9C+1"*#)+"J 8,D EFC&K"+4+.B&I9C+"*#)+"+L MC",DK"+N ,D"+)*OPB+E+"+F*P+C+EQ""+F,"C".0.13 R 8,D6"+"+:*C".0*B<PS)TE"+"+F ,D&UD+,D"+V3T6"+"+W+"+XVY""+Z [10+\".134+.B8,DB<79E#""F10+%+8779E#"FCREATE PROCEDURE prcBrand @cBrandId char(3) OUTPUT,@cBrandName char(16)asSELECT @cBrandName = cBrandNameFROM ToyBrand WHERE cBrandId = @cBrandId";]+',D.13U*^$9"DECLARE @cBrandName char(16)exec prcBrand '001',@cBrandName OUTPUTSELECT @cBrandName_7$>"*\B<&7910+%+ 67U">* 8,D"+`a`b.BB<&*.<"c,"-);$"+d8B#"+.13  [!"10+\"4+.B8,D#e+5,"8,+!"^*#)+"+CREATE PROCEDURE prcAddCategory @CategoryId char(3),@Category char(20), @Descrip char(30)asINSERT Category VALUES('CategoryId','Category','Descrip')";,D.13"]+'$9".134+.BUexec prcAddCategory '017','War Games','A wide range of toy guns'9#<#$>*;(+9.13 67U">,D&A ,DV`7C".0C8+1"CREATE PROCEDURE prcGenOrder@OrderNo char(6)OUTPUTasSELECT @OrderNo=Max(cOrderNo) FROM OrdersSELECT @OrderNo=CASEWHEN @OrderNo >=0 and @OrderNo<9 Then'00000'+Convert (char, @OrderNo+1)WHEN @OrderNo>=9 and @OrderNo<99 Then'0000'+Convert (char, @OrderNo+1)WHEN @OrderNo>=99 and @OrderNo<999 Then'000'+Convert (char, @OrderNo+1)WHEN @OrderNo>=999 and @OrderNo<9999 Then'00'+Convert (char, @OrderNo+1)WHEN @OrderNo>=9999 and @OrderNo<99999 Then'0'+Convert (char, @OrderNo+1)WHEN @OrderNo>=99999 Then Convert (char, @OrderNo+1)ENDRETURNf;$+]$:"'$#1^"g.139" _7C".0.132,D&# _7C".0'+9'"h'*hg.13.1"*#)+`$#1^&).1394+gE)"F67B+"<&8,D*^"h*h",",DG f+12"+EF&g+CSC./0!"'$#1^g9*^C".0,";$1"" 8PVY"&1*^+$<iaj*8P"h&.13::*^7+CSEQ"F.7.13;$!# kP+CSE+YQ""+Fg.13::$#1^&g)"67B+"<&8,D*^C".0'7./0'*7+CS"H ,D+hYB<&'!;$++3T,"+12+! l5+12+!;(++-&!g]\mn.<,D)*O-)+12"+C&#?.g oPDCB+!,D$$"EXECUTE +hY; OrEXECUTE +hYN'Wi%'; OrEXECUTE +hY@FirstName = N'%'; OrEXECUTE +hYN'[CK]ars[OE]n'; OrEXECUTE +hY N'Hesse', N'Stefen'; OrEXECUTE +hYN'H%', N'S%';J ,DB<5.mn+p+7&n1"&&n _7./0 &./0 13+[/0g).mn&+513+/;1^A'13+.mn4(n*.0+$5+$qr'\13+.mnA'+$qrA\13+.mn'+1313+.mnJ . ,D&UD+,D"+ V3T6"+"+W+"+XVY""+ Z [ 10 +".134+.B8,DB<79 E#""F 10 +%+8779E#"F CREATE. '001',@cBrandName OUTPUT SELECT @cBrandName _7$>"*B<&79 10 +%+ 67U">*  8,D"+`a`b.BB<&*.<" c,"-);$"+d8B#"+.13. 8,D"+`a`b.BB<&*.<" c,"-);$"+d8B#"+.13   [!" 10 +"4+.B8,D#e+5,"8 ,+!"^*#)+"+ CREATE
- Xem thêm -

Xem thêm: Bài tập thực hành môn cơ sở dữ liệu, Bài tập thực hành môn cơ sở dữ liệu, Bài tập thực hành môn cơ sở dữ liệu

Gợi ý tài liệu liên quan cho bạn

Nhận lời giải ngay chưa đến 10 phút Đăng bài tập ngay