SQLº¯Êý´óÈ«
Ò»¡¢ÄÚ²¿º¯Êý
1¡¢ÄÚ²¿ºÏ¼Æº¯Êý
1£©COUNT£¨*£© ·µ»ØÐÐÊý
2£©COUNT£¨DISTINCT COLNAME£©·µ»ØÖ¸¶¨ÁÐÖÐΨһֵµÄ¸öÊý
3£©SUM£¨COLNAME/EXPRESSION£©·µ»ØÖ¸¶¨Áлò±í´ïʽµÄÊýÖµºÍ£»
4£©SUM£¨DISTINCT COLNAME£© ·µ»ØÖ¸¶¨ÁÐÖÐΨһֵµÄºÍ
5£©AVG£¨COLNAME/EXPRESSION£©·µ»ØÖ¸¶¨Áлò±í´ïʽÖеÄÊýֵƽ¾ùÖµ
6£©AVG£¨DISTINCT COLNAME£© ·µ»ØÖ¸¶¨ÁÐÖÐΨһֵµÄƽ¾ùÖµ
7£©MIN£¨COLNAME/EXPRESSION£©·µ»ØÖ¸¶¨Áлò±í´ïʽÖеÄÊýÖµ×îСֵ
8£©MAX£¨COLNAME/EXPRESSION£©·µ»ØÖ¸¶¨Áлò±í´ïʽÖеÄÊýÖµ×î´óÖµ
2¡¢ÈÕÆÚÓëʱ¼äº¯Êý
1£©DAY£¨DATE/DATETIME EXPRESSION£©·µ»ØÖ¸¶¨±í´ïʽÖеĵ±Ô¼¸ºÅ
2£©MONTH£¨DATE/DATETIME EXPRESSION£© ·µ»ØÖ¸¶¨±í´ïʽÖеÄÔ·Ý
3£©YEAR£¨DATE/DATETIME EXPRESSION£©·µ»ØÖ¸¶¨±í´ïʽÖеÄÄê·Ý
4£©WEEKDAY£¨DATE/DATETIME EXPRESSION£© ·µ»ØÖ¸¶¨±í´ïʽÖеĵ±ÖÜÐÇÆÚ¼¸
5£©DATE£¨NOT DATE EXPRESSION£©·µ»ØÖ¸¶¨±í´ïʽ´ú±íµÄÈÕÆÚÖµ
6£©TODAY ·µ»Øµ±Ç°ÈÕÆÚµÄÈÕÆÚÖµ
7£©CURRENT[FIRST TO LAST] ·µ»Øµ±Ç°ÈÕÆÚµÄÈÕÆÚʱ¼äÖµ
8£©COLNAME/EXPRESSION UNITS PRECISION ·µ»ØÖ¸¶¨¾«¶ÈµÄÖ¸¶¨µ¥Î»Êý
9£©MDY£¨MONTH£¬DAY£¬YEAR£© ·µ»Ø±êʶָ¶¨Äê¡¢Ô¡¢ÈÕµÄÈÕÆÚÖµ
10£©DATETIME£¨DATE/DATETIME EXPRESSION£©FIRST TO LAST ·µ»Ø±í´ïʽ´ú±íµÄÈÕÆÚʱ¼äÖµ
11£©INTERVAL£¨DATE/DATETIME EXPRESSION£©FIRST TO LAST ·µ»Ø±í´ïʽ´ú±íµÄʱ¼ä¼ä¸ôÖµ
12£©EXTEND£¨DATE/DATETIME EXPRESSION£¬[FIRST TO LAST]£©·µ»Ø¾¹ýµ÷ÕûµÄÈÕÆÚ»òÈÕÆÚʱ¼äÖµ
To_charº¯Êý½«datetimeºÍdateֵת»¯Îª×Ö·ûÖµ¡£
To_dateº¯Êý½«×Ö·ûֵת»¯ÎªdatetimeÀàÐ͵ÄÖµ¡£Àýto_date(“1978-10-07 10:00” ,”%Y-%m-%d %H:%M)
Àý×Ó1¡¢ºÍUNITSºÏÓã¬Ö¸¶¨ÈÕÆÚ»òʱ¼äµ¥Î»(year,month,day,hour,minute,seond,fraction)£º
let tmp_date = today + 3 UNITS day
Àý×Ó2¡¢let tmp_date = MDY(10,30,2002) -- 2002-10-30
Àý×Ó3¡¢let tmp_date = today + interval(7) day to day --µ±Ç°Ê±¼ä¼ÓÉÏ7Ì죻
×¢£º¸Ã¹¦ÄÜÓë1ÏàËÆ£»
Àý×Ó4¡¢EXTENDת»»ÈÕÆÚ»òÈÕÆÚʱ¼äÖµ
let tmp_inthour = extend(datetime1,hour to hour)
3¡¢´úÊýº¯Êý
1£©ABS(COLNAME/EXPRESSION)£º È¡¾ø¶ÔÖµ
2£©MOD£¨COLNAME/EXPRESSION£¬DIVISOR£© ·µ»Ø³ýÒÔ³ýÊýºóµÄÄ££¨ÓàÊý£©
3£©POW£¨COLNAME/EXPRESSION£¬EXPONENT£© ·µ»ØÒ»¸öÖµµÄÖ¸ÊýÚ¤
Àý×Ó£ºlet tmp_float = pow(2
Ïà¹ØÎĵµ£º
Ç°ÑÔÀÎÒ̸µ½ÁËһЩFORTRAN³ÌÐòÔ±ºÍÒ»ÃûLISP³ÌÐòÔ±µÄÊ£¬Ç°ÕßÖ»»áʹÓÃÑ»·À´½â¾öÎÊÌ⣬ºóÕßÖ»»áʹÓõݹ鷽ʽ½â¾öÎÊÌâ¡£ÕâÖÖÇé¿ö²¢²»
ÉÙ¼û£¬ÒòΪÈËÃǶ¼Ï²»¶Ê¹ÓÃ×Ô¼ºÁ˽âµÄ¹¤¾ß¡£ÏÂÃæ½²Ò»¸öЦ»°£¬²»ÊÇÕæÊ£ºÓÐÈ˸øÒ»¸öÊýѧ¼Ò¡¢Ò»¸öÎïÀíѧ¼ÒºÍÒ»¸öÊý¾Ý¿â³ÌÐòÔ±¸÷·¢ÁËÒ»¸öÏðƤÇò£¬²¢ÇÒÈÃËûÃÇÈ·
¶¨ÇòµÄÌå»ý¡£
Êýѧ¼Ò ......
±êÇ©£ºÊý¾Ý·ÃÎÊ LINQ LINQ to SQL ²¿·Ö
ä¯ÀÀLINQ to SQL¹Øϵ Á½¸ö¹ØÁªµÄ±í£º
& ......
/*Á½ÖÖ·½·¨µÄÇ°Ì᣺1.±¾µØ·þÎñÆ÷µÄsqlserver agent·þÎñ±£Ö¤´¦ÓÚÆô¶¯×´Ì¬
2.Ô¶³Ì¼ÆËã»ú£¨¼ÆËã»ú¹ÜÀíÀ½¨Á¢Ò»¸öÆÕͨȨÏÞÓû§£¬²¢ÎªÆä¼ÓÉÏÃÜÂ루ÀýÈçÓû§ÃûΪkyle£¬ÃÜÂëΪ1234£©£¬Í¬Ê±ÔÚÄÇ̨»úÆ÷µÄ·ÇϵͳÅÌÀィһ¸öÃûΪbackupµÄ¹²ÏíÎļþ¼Ð£¬ÎªÁË°²È«ÁíÍâÉèÖÃÕ ......
±êÇ©£ºÊý¾Ý·ÃÎÊ ADO.NET
Ö±½ÓÖ´ÐÐSQLÃüÁî Ö´ÐÐÃæÏò¼¯ºÏµÄ²Ù×÷£¨ ......
±êÇ©£ºÊý¾Ý·ÃÎÊ ADO.NET
µ÷ÓÃSQL´æ´¢¹ý³Ì ´æ´¢¹ý³ÌÔÚÒ»¸öµ¥ÔªÖзâ×°Á˸´ÔÓµÄSQL²éѯºÍÊý¾Ý¹ý³Ì£¬¿ÉÒÔÓɶà¸ö³ÌÐò»òÓû§Ö®¼äµ÷Óá£
Àý£º
......