±àдһ¸ö³ÌÐò¸ù¾ÝÄêÁäÅжÏÒ»¸öÈËÊDz»ÊǶùͯ(ÉèÒ»¸öÈ˵ÄÄêÁäÉÙÓÚ10ËêΪ¶ùͯ)
declare @age int
set @age=1
if @age<10
print '¶ùͯ'
else
print '²»ÊǶùͯ'
ÇëÎÊ¿ÉÒÔ×Ô¼ºÊäÈëageÂð£¿
ÎÒ²»ÖªµÀSQL Óï¾ä±à³ÌÓмüÅÌÊäÈëµÄÂ𣨱ÈÈçCÓïÑÔÖеÄscanf)
ûÓС£
µÄÈ·ÊÇûÓмüÅÌÊäÈëµÄ
д´æ´¢¹ý³Ì °Ñageµ±¸ö ......
ÌâÄ¿ÊÇ ´´½¨Ò»¸ö´æ´¢¹ý³Ì£¬¹¦ÄÜÊǸù¾ÝÊäÈëµÄ²ÎÊýÐÎʽ¸ø¶¨µÄѧÉú´Óxs,kcºÍxk±íÖвéѯ³öÕâЩѧÉúµÄѧºÅÐÕÃûºÍËùÑ¡¿Î³ÌµÄ¿Î³ÌÃûºÍ³É¼¨
create proc test_proc2
as
select xs.xh,xsxm,kcm,cj from xs,kc,xk
exec test_proc2 ' ',' ',' ',' ' --''ÀïµÄ¾ßÌå²ÎÊýÎÒûд
´´½¨Ò»¸ö´æ´¢¹ý³Ì£¬¸ù¾ÝÒѾÊäÈë²ÎÊýÐÎʽ¸ø¶¨µÄѧÉúµÄѧ ......
ÓÐÒ»¸ö×Ö¶ÎA £¬ÀïÃæÊǾßÌåÊÇÊý×Ö£¬
ÎÒÏëÈÃËû²éѯÏÔʾʱ¼ÓÅÐ¶Ï ±ÈÈç £º0-100 ÏÔʾ³É£º1 £»101-200 ÏÔʾ³É£º2
ÈçºÎʵÏÖ£¬²»Ê¤¸Ð¼¤£¡£¡£¡
ÒýÓÃ
ÓÐÒ»¸ö×Ö¶ÎA £¬ÀïÃæÊǾßÌåÊÇÊý×Ö£¬
ÎÒÏëÈÃËû²éѯÏÔʾʱ¼ÓÅÐ¶Ï ±ÈÈç £º0-100 ÏÔʾ³É£º1 £»101-200 ÏÔʾ³É£º2
ÈçºÎʵÏÖ£¬²»Ê¤¸Ð¼¤£¡£¡£¡
select case when col ......
×öÁËÒ»¸ö¹ÜÀí³ÌÐò
ÏëÈÃÊý¾Ý¿âÓиöÃÜÂë
Ö»ÓÐÊäÈëÃÜÂë²ÅÄܽøÈëÊý¾Ý¿âÖÐ
½øÐÐÐ޸ģ¬
µÚÒ»´Î×öÊý¾Ý¿â£¬ÇëÎÊ´ó¼ÒÈçºÎ¸øÊý¾Ý¿â»òÕß
ÆäÖеıíÉèÖÃÃÜÂ룬ÒÔ·À±ðÈ˵ǽ
1Â¥µÄÄÜÏêϸЩÂð£¿
ûÓп´¶®
º¹ ²»ÊÇÓÀÉú¸çµÄÒâ˼°É
Â¥Ö÷²»±Ø×ö³ÌÐòµÄ£¬sql×Ô´ø·þÎñÆ÷½ÇÉ«ºÍÊý¾Ý¿â½ÇÉ«£¬Äã¿ÉÒÔÌí¼Ó¸öÓû§£¬ÔÚ·þÎñÆ÷½ÇÉ«ÀïÄÜ¿ ......
ÓÐÁ½±í£¨T_CAR£©
{
CAR_ID INT IDENTITY
CUST_ID INT
}
(T_CUSTOMER)
{
CUST_ID INT IDENTITY
CUST_NAME VARCHAR(100)
}
ÏÖÔÚÒª²éѯ±í£¨T_CAR£©ÖÐ×Ö¶ÎCUST_ID²»´æÔÚ±í£¨T_CUSTOMER£©µÄÊý¾Ý
ÒÑÖª²éѯsqlÓÐÁ½¸ö
Ò»£©
SELECT * from T_CAR WHERE CUST_ID NOT IN (SELECT CUST_ID from T_CUSTOMER)
¶þ£©
SELECT ......
ÎÒÕâÓжþÕÅ±í£¬
±íÒ»£ºArvichFile
CameraSign(int 4),FileEndTime(datetime),FileEndTime(datetime)
303101 2010-3-18 15:51:12 2010-3-18:15:35:26
303201 2010-3-18 15:54:42 2010-3-18 16:00:00
303101 2010-4-1 09:20:07 2010-4-1 12:30:00
303201 2010-4-1 09:20:07 2010-4-1 12:30:40
303501 2010-4-1 09:20:0 ......
×ܼǼÊý:3315; ×ÜÒ³Êý:553; ÿҳ6 Ìõ;
Ê×Ò³ ÉÏÒ»Ò³ 1
[2] [3] [4] [5] [6] [7] [8] [9] [10] ÏÂÒ»Ò³ βҳ