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

sql²éѯ±íÖÐ×ֶβ»Öظ´

·½·¨Ò»£º
 select distinct name from tablename
·½·¨¶þ£º
select min(fid),name,sex from tablename group by name
×ܼƣº
select distinct name from tablename ´ò¿ªÖظ´¼Ç¼µÄµ¥¸ö×Ö¶Î
select * from tablename where fid in(Select min(fid) from tablename group by name)´ò¿ªÖظ´¼Ç¼µÄËùÓÐ×Ö¶ÎÖµ
select   *   from   tablename   where   name in(select   name   from   tablename   group   by   name     having   count(name)=1)´ò¿ªÖظ´ÈÎÒâ´ÎÊýµÄËùÓмǼ


Ïà¹ØÎĵµ£º

SQL Server Management StudioÖС°ÒѽûÓôúÀí XP¡±

ÔÚSQL Server Management StudioÖÐÁ¬½Óµ½SQL ServerʵÀýºó£¬»áÏÔʾ“SQL Server ´úÀ픽ڵ㡣Èç¹ûµ±Ç°¸ÃʵÀýµÄAgent·þÎñûÓÐÆô¶¯£¬“SQL Server ´úÀ픺ó±ß¾Í»áÏÔʾ“(ÒѽûÓôúÀí¡¡XP)”¡£“ÒѽûÓôúÀí”´Ó×ÖÃæÉϲ»ÄÑÀí½â£¬ºó±ßµÄ“XP”ÓеãÈÃÈ˷ѽâÁË£¬Õâ¸ö·þÎñ¸úWindo ......

SQL ServerʵÏÖÊý¾Ý¿â¶¨Ê±×Ô¶¯±¸·Ý

ÔÚSQL ServerÖгöÓÚÊý¾Ý°²È«µÄ¿¼ÂÇ£¬ËùÒÔÐèÒª¶¨Æڵı¸·ÝÊý¾Ý¿â¡£¶ø±¸·ÝÊý¾Ý¿âÒ»°ãÓÖÊÇÔÚÁ賿ʱ¼ä»ù±¾Ã»ÓÐÊý¾Ý¿â²Ù×÷µÄʱºò½øÐУ¬ËùÒÔÎÒÃDz»¿ÉÄÜÒªÇó¹ÜÀíԱÿÌìÊص½ÍíÉÏ1µãÈ¥±¸·ÝÊý¾Ý¿â¡£ÒªÊµÏÖÊý¾Ý¿âµÄ¶¨Ê±×Ô¶¯±¸·Ý£¬×î³£Óõķ½Ê½¾ÍÊÇʹÓÃSQL Server´úÀíÖеÄ×÷Òµ¡£Æô¶¯SQL Server Agent·þÎñ£¬È»ºóÔÚÆäÖÐн¨×÷Òµ£¬×÷ÒµÖÐÌí¼ ......

sql×¢Èë³£ÓÃÓï¾ä

and exists (select * from sysobjects) //ÅжÏÊÇ·ñÊÇMSSQL and exists(select * from tableName) //ÅжÏij±íÊÇ·ñ´æÔÚ..tableNameΪ±íÃû and 1=(select @@VERSION) //MSSQL°æ±¾ And 1=(select db_name()) //µ±Ç°Êý¾Ý¿âÃû and 1=(select @@servername) //±¾µØ·þÎñÃû and 1=(select IS_SRVROLEMEMBER('sysadmin')) ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ