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

SQLÉú³ÉËæ»ú×Ö·û´®

declare @str varchar(50)
 declare   @i   int  
 set @str = ''
   set   @i=0  
   while   @i<50 
   begin  
        set   @str = @str + char(33 + cast(ceiling(rand() * 80) as int))
  set @i = @i+1
   end  
 
  select @str


Ïà¹ØÎĵµ£º

SQLÖÐobject_idº¯ÊýµÄÓ÷¨

 ¾­³£»á¿´¼ûÔÚSQL³ÌÐòµÄ¿ªÍ·ÓÐÕâÑùÒ»¾ä»°
if OBJECT_ID('tb') is not null
drop table tb  
º¯ÊýÓï·¨ÊÇÕâÑù£º
int OBJECT_ID('objectname');
×÷ÓÃÊÇ¿´¶ÔÏóobjectnameÊÇ·ñ´æÔÚ¡£
ÆäÖвÎÊýobjectname±íʾҪʹÓõĶÔÏó£¬ÊÇchar»òÕßncharÀàÐÍ¡£
·µ»ØÖµÀàÐÍΪint£¬Èç¹û¶ÔÏó´æÔÚ£¬Ôò·µ»Ø´Ë¶ÔÏóÔÚϵͳÖеı ......

SQL ³£ÓÃÓï¾äÒÔ¼°º¯Êý

SQL ³£ÓÃÓï¾äÒÔ¼°º¯ÊýÖ®Ò» 
SELECT --´ÓÊý¾Ý¿â±íÖмìË÷Êý¾ÝÐкÍÁÐ
¡¡¡¡¡¡¡¡¡¡¡¡INSERT --ÏòÊý¾Ý¿â±íÌí¼ÓÐÂÊý¾ÝÐÐ
¡¡¡¡¡¡¡¡¡¡¡¡DELETE --´ÓÊý¾Ý¿â±íÖÐɾ³ýÊý¾ÝÐÐ
¡¡¡¡¡¡¡¡¡¡¡¡UPDATE --¸üÐÂÊý¾Ý¿â±íÖеÄÊý¾Ý
¡¡¡¡--Êý¾Ý¶¨Òå
¡¡¡¡ CREATE TABLE --´´½¨Ò»¸öÊý¾Ý¿â±í
¡¡¡¡¡¡¡¡¡¡¡¡DROP TABLE --´ÓÊý¾Ý¿âÖÐɾ³ý±í
......

SQL Server²éѯÓÅ»¯

MS SQL Server²éѯÓÅ»¯·½·¨
×÷Õߣºxmllover 2007-11-29 
²éѯËÙ¶ÈÂýµÄÔ­ÒòºÜ¶à£¬³£¼ûÈçϼ¸ÖÖ 
  1¡¢Ã»ÓÐË÷Òý»òÕßûÓÐÓõ½Ë÷Òý(ÕâÊDzéѯÂý×î³£¼ûµÄÎÊÌ⣬ÊdzÌÐòÉè¼ÆµÄȱÏÝ) 
  2¡¢I/OÍÌÍÂÁ¿Ð¡£¬ÐγÉÁËÆ¿¾±Ð§Ó¦¡£ 
  3¡¢Ã»Óд´½¨¼ÆËãÁе¼Ö²éѯ²»ÓÅ»¯¡£ 
  4¡¢ÄÚ´æ ......

[Sql]EXCEPT ºÍ INTERSECT¹Ø¼ü×Ö

[Sql]EXCEPT ºÍ INTERSECT¹Ø¼ü×Ö
http://www.cnblogs.com/treeyh/archive/2008/07/01/1232845.html
EXCEPT
´Ó EXCEPT ²Ù×÷Êý×ó±ßµÄ²éѯÖзµ»ØÓұߵIJéѯδ·µ»ØµÄËùÓзÇÖظ´Öµ¡£
INTERSECT
·µ»Ø INTERSECT ²Ù×÷Êý×óÓÒÁ½±ßµÄÁ½¸ö²éѯ¾ù·µ»ØµÄËùÓзÇÖظ´Öµ¡£
A. ʹÓà EXCEPT
ÔÚʾÀýÖÐʹÓà TableA ºÍ TableB ÖеÄÊý¾Ý¡£ ......

¿ìËٸ㶨ÔÚEclipseÖÐÓÃJDBCÁ¬½ÓSQL Server 2005

1¡¢ÏÂÔرر¸Èí¼þ
(1) JDK (Java Development Kit)
SUN¹Ù·½µÄÏÂÔصØÖ·ÊÇhttp://java.sun.com/javase/downloads/index.jsp
(2) JDBC
(3) Eclipse
(4) Microsoft SQL Server 2005 Express£¨µ±È»£¬ÓзÇExpressÒ²OK°¡£©
(5) SQL Server Management Studio
2¡¢°²×°Óë»·¾³ÅäÖÃ
(1) JDK
Ê×ÏÈÔÚWindows»·¾³Ï£¬ÏÂÔغó° ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ