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

SQLServerÊý¾Ý¼¯ºÏµÄ½»¡¢²¢¡¢²î¼¯ÔËËã

 SQLServer2005ͨ¹ýintersect,union,exceptºÍÈý¸ö¹Ø¼ü×Ö¶ÔÓ¦½»¡¢²¢¡¢²îÈýÖÖ¼¯ºÏÔËËã¡£
ËûÃǵĶÔÓ¦¹ØÏµ¿ÉÒԲο¼ÏÂÃæÍ¼Ê¾
       Ïà¹Ø²âÊÔʵÀýÈçÏ£º
use tempdb
go
if (object_id ('t1' ) is not null ) drop table t1
if (object_id ('t2' ) is not null ) drop table t2
go
create table t1 (a int )
insert into t1 select 1 union select 2 union select 3
create table t2 (a int )
insert into t2 select 3 union select 4 union select 5
go
select * from t1 union select * from t2
go
/* Çó±í²¢¼¯
1
2
3
4
5*/
select * from t1 union all   select * from t2
go
/*Çó±í²¢¼¯²»¹ýÂËÖØ¸´
1
2
3
3
4
5*/
select * from t1 except select * from t2
go
/*Çót1¶Ôt2µÄ²î¼¯
1
2*/
select * from t1 intersect select * from t2
go
/*Çót1¶Ôt2µÄ½»¼¯
3*/
±¾ÎÄÀ´×ÔCSDN²©¿Í£¬×ªÔØÇë±êÃ÷³ö´¦£ºhttp://blog.csdn.net/jinjazz/archive/2009/09/07/4527863.aspx


Ïà¹ØÎĵµ£º

Ö»ÈÃÖ¸¶¨µÄ»úÆ÷Á¬½ÓSQLServer·þÎñÆ÷ ÊÕ²Ø

Ö»ÈÃÖ¸¶¨µÄ»úÆ÷Á¬½ÓSQLServer·þÎñÆ÷ ÊÕ²Ø
±³¾°
Ö»Ïëʹij¸öIPµÄ¼ÆËã»ú²ÅÄÜÁ¬½Óµ½SQL Server·þÎñÆ÷£¬²»ÔÊÐíÆäËû¿Í»§¶ËÁ¬½Ó¡£
½â¾ö·½·¨
¿ÉÒÔÖ±½ÓÔÚ·À»ðǽÖÐ×öÏÞÖÆ£¬Ö»ÔÊÐíÓëÖ¸¶¨µÄIPµØÖ·½¨Á¢1433µÄͨѶ¡£µ±È»£¬´Ó¸üΪ°²È«µÄ½Ç¶ÈÀ´¿¼ÂÇ£¬Ó¦¸Ã°Ñ1433¶Ë¿Ú¸Ä³ÉÆäËûµÄ¶Ë¿Ú¡£
ÆäËû½â¾ö·½·¨1£¨ÏÞ´ÓÖ¸¶¨IP½ÓÈëµÄ¿Í»§¶Ë£©
Èç¹ûʹ ......

×ܽáÒ»µãAccessÓëSqlserverµÄsqlµÄ²îÒì

×î½üÕûÀí³öÀ´µÄ.Èç¹û²»ÍêÈ«µÄ»°Ï£Íû´ó¼Ò²¹³ä.
ÔÚaccessÖУ¬×ª»»Îª´óдµÄsqlº¯ÊýÊÇucase£¬ÔÚsqlserverÖУ¬×ª»»Îª´óдµÄº¯ÊýÊÇupper£»ÔÚaccessÖУ¬×ª»»ÎªÐ¡Ð´µÄº¯ÊýÊÇlcase£¬ÔÚsqlserverÖУ¬×ª»»ÎªÐ¡Ð´µÄº¯ÊýÊÇlower£»ÔÚaccessÖУ¬È¡µ±Ç°Ê±¼äµÄº¯ÊýÊÇnow£¬ÁíÍ⻹ÓÐÒ»¸öÈ¡ÈÕÆÚº¯Êýdate£¬ÔÚsqlserverÖУ¬È¡µ±Ç°µÄº¯ÊýÊÇgetdate ......

aspÁ¬sqlserver²âÊÔ´úÂë

<%
Dim Conn, Connstr
Dim strServer, strUid, strPwd, strDB
strServer = "HUA-5780C2D1CCF"        'SQLÊý¾Ý¿â·þÎñÆ÷µØÖ·
strUid = "sa"                'Êý¾Ý¿âÓû§Ãû
strPwd = "123456"  ......

SQLServerϵͳ´æ´¢¹ý³Ì

sp_databases --Áгö·þÎñÆ÷ÉϵÄËùÓÐÊý¾Ý¿â
sp_server_info --Áгö·þÎñÆ÷ÐÅÏ¢£¬Èç×Ö·û¼¯£¬°æ±¾ºÍÅÅÁÐ˳Ðò
sp_stored_procedures--Áгöµ±Ç°»·¾³ÖеÄËùÓд洢¹ý³Ì
sp_tables --Áгöµ±Ç°»·¾³ÖÐËùÓпÉÒÔ²éѯµÄ¶ÔÏó
sp_start_job --Á¢¼´Æô¶¯×Ô¶¯»¯ÈÎÎñ
sp_stop_job --Í£Ö¹ÕýÔÚÖ´ÐеÄ×Ô¶¯»¯ÈÎÎñ
sp_password --Ìí¼Ó»òÐ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ