Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

SQL TRUNCATE TABLEµÄÓ÷¨

ÓÐʱºòÎÒÃÇ»áÐèÒªÇå³ýÒ»¸ö±í¸ñÖеÄËùÓÐ×ÊÁÏ¡£Òª´ïµ½Õ߸öÄ¿µÄ£¬Ò»ÖÖ·½Ê½ÊÇÎÒÃÇÔÚ SQL DROP ÄÇÒ»Ò³ ¿´µ½µÄ DROP TABLE Ö¸Áî¡£²»¹ýÕâÑùÕû¸ö±í¸ñ¾ÍÏûʧ£¬¶øÎÞ·¨ÔÙ±»ÓÃÁË¡£ÁíÒ»ÖÖ·½Ê½¾ÍÊÇÔËÓà TRUNCATE TABLE µÄÖ¸Áî¡£ÔÚÕâ¸öÖ¸Áî֮ϣ¬±í¸ñÖеÄ×ÊÁÏ»áÍêÈ«Ïûʧ£¬¿ÉÊDZí¸ñ±¾Éí»á¼ÌÐø´æÔÚ¡£ TRUNCATE TABLE µÄÓ﷨ΪÏ£º
TRUNCATE TABLE "±í¸ñÃû"
ËùÒÔ£¬ÎÒÃÇÈç¹ûÒªÇå³ýÔÚ SQL Create ÄÇÒ»Ò³½¨Á¢µÄ¹Ë¿Í±í¸ñÖ®ÄÚµÄ×ÊÁÏ£¬ÎÒÃǾʹòÈ룺
TRUNCATE TABLE customer.


Ïà¹ØÎĵµ£º

sql 2005 ´æ´¢¹ý³Ì·ÖÒ³ java ´úÂë

 create PROCEDURE pagelist
@tablename nvarchar(50),
@fieldname nvarchar(50)='*',         
@pagesize int output,--ÿҳÏÔʾ¼Ç¼ÌõÊý
@currentpage int output,--µÚ¼¸Ò³
@orderid nvarchar(50),--Ö÷¼üÅÅÐò
@sort int,--ÅÅÐò·½Ê½£¬1±íʾÉýÐò£¬0±íʾ½µÐòÅÅÁÐ ......

º½¿Õ¹«Ë¾¹ÜÀíϵͳ(VC++ ÓëSQL 2005)

ϵͳ»·¾³£ºWindows 7
Èí¼þ»·¾³£ºVisual C++ 2008 SP1 +SQL Server 2005
±¾´ÎÄ¿µÄ£º±àдһ¸öº½¿Õ¹ÜÀíϵͳ
      ÕâÊÇÊý¾Ý¿â¿Î³ÌÉè¼ÆµÄ³É¹û£¬ËäÈ»³É¼¨²»¼Ñ£¬µ«ÊÇ×÷ΪÎÒÓÃVC++ ÒÔÀ´±àдµÄ×î´ó³ÌÐò»¹ÊÇ´«µ½ÍøÉÏ£¬ÒÔ¹©²Î¿¼¡£ÓÃVC++ ×öÊý¾Ý¿âÉè¼Æ²¢²»ÈÝÒ×£¬µ«Ò²²»ÊDz»¿ÉÄÜ¡£ÒÔÏÂÊÇÎҵijÌÐò½çÃ棬ºóÃæ ......

SQL º¯ÊýµÄÓ÷¨

¼ÈÈ»Êý¾Ý¿âÖÐÓÐÐí¶à×ÊÁ϶¼ÊÇÒÑÊý×ÖµÄÐÍ̬´æÔÚ£¬Ò»¸öºÜÖØÒªµÄÓÃ;¾ÍÊÇÒªÄܹ»¶ÔÕâЩÊý×Ö×öһЩÔËË㣬ÀýÈ罫ËüÃÇ×ܺÏÆðÀ´£¬»òÊÇÕÒ³öËüÃǵÄƽ¾ùÖµ¡£SQL ÓÐÌṩһЩÕâÒ»ÀàµÄº¯Êý¡£ËüÃÇÊÇ£º
AVG (ƽ¾ù)
COUNT (¼ÆÊý)
MAX (×î´óÖµ)
MIN (×îСֵ)
SUM (×ܺÏ)
ÔËÓú¯ÊýµÄÓï·¨ÊÇ£º
SELECT "º¯ÊýÃû"("À¸Î»Ãû")
from "± ......

SQL CONCATENATEµÄÓ÷¨

ÓеÄʱºò£¬ÎÒÃÇÓÐÐèÒª½«Óɲ»Í¬À¸Î»»ñµÃµÄ×ÊÁÏ´®Á¬ÔÚÒ»Æð¡£Ã¿Ò»ÖÖ×ÊÁϿⶼÓÐÌṩ·½·¨À´´ïµ½Õâ¸öÄ¿µÄ£º
MySQL: CONCAT()
Oracle: CONCAT(), ||
SQL Server: +
CONCAT() µÄÓï·¨ÈçÏ£º
CONCAT(×Ö´®1, ×Ö´®2, ×Ö´®3, ...): ½«×Ö´®1¡¢×Ö´®2¡¢×Ö´®3£¬µÈ×Ö´®Á¬ÔÚÒ»Æð¡£Çë×¢Ò⣬OracleµÄCONCAT()Ö»ÔÊÐíÁ½¸ö²ÎÊý£»»»ÑÔÖ®£¬Ò ......

SQL TRIMµÄÓ÷¨

SQL ÖÐµÄ TRIM º¯ÊýÊÇÓÃÀ´ÒƳýµôÒ»¸ö×Ö´®ÖеÄ×ÖÍ·»ò×Öβ¡£×î³£¼ûµÄÓÃ;ÊÇÒƳý×ÖÊ×»ò×ÖβµÄ¿Õ°×¡£Õâ¸öº¯ÊýÔÚ²»Í¬µÄ×ÊÁÏ¿âÖÐÓв»Í¬µÄÃû³Æ£º
MySQL: TRIM(), RTRIM(), LTRIM()
Oracle: RTRIM(), LTRIM()
SQL Server: RTRIM(), LTRIM()
¸÷ÖÖ trim º¯ÊýµÄÓï·¨ÈçÏ£º
TRIM([[λÖÃ] [ÒªÒƳýµÄ×Ö´®] from ] ×Ö´®): [λÖÃ] ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ