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

PowerShell±Ê¼Ç£¨Èý£©£ºµ÷ÓÃMS SQLÊý¾Ý¿â

ÊÔÁËÒ»°ÑPowerShell·ÃÎÊÊý¾Ý¿â£¬¸úÓÃC#д¼¸ºõûÈκÎÇø±ð~
ΪÁ˼òµ¥Æð¼û£¬´úÂëÓеã³ó£¬²»ÓÃÌ«É
$ConnString = "server=_SERVER_;database=_DATABASE_;user id=_UID_;password=_PWD_";
$db = New-Object System.Data.SqlClient.SqlConnection($ConnString);
$db.Open();
$Sql = "select top 10 * from sys.objects where type='U' order by [Name]";
$cmd = New-Object System.Data.SqlClient.SqlCommand($Sql,$db);
$r = $cmd.ExecuteReader();
$a = "","";
while ($r.Read())
{
 $a = $a + $r["Name"].ToString();
}
$r.Close();
$cmd.Dispose();
$db.Close();
$db.Dispose();
echo $a


Ïà¹ØÎĵµ£º

ÈçºÎʹÓà SSL À´È·±£Óë SQL Server 2000 °²È«Í¨ÐÅ

 
ÈçºÎʹÓà SSL À´È·±£Óë SQL Server 2000 °²È«Í¨ÐÅ
¸üÐÂÈÕÆÚ£º 2004Äê04ÔÂ20ÈÕ
±¾Ò³ÄÚÈÝ
Ä¿±ê
ÊÊÓ÷¶Î§
ÈçºÎʹÓñ¾ÕÂÄÚÈÝ
ÕªÒª
Äú±ØÐëÁ˽âµÄ±³¾°ÖªÊ¶
°²×°·þÎñÆ÷ÑéÖ¤Ö¤Êé
ÑéÖ¤Ö¤ÊéÊÇ·ñÒÑ°²×°
ÔÚ¿Í»§¶Ë°²×° CA °ä·¢µÄÖ¤Êé
Ç¿ÖÆËùÓпͻ§¶ËʹÓà SSL
ÔÊÐí¿Í»§¶Ë¾ö¶¨ÊÇ·ñʹÓà SSL
Ñé֤ͨÐÅÊÇ·ñÒѼÓÃÜ
ÆäËû× ......

SQLÓï¾ä½Ì³Ì

ÔÚÕâÒ»Ò³ÖУ¬ÎÒÃÇÁгöËùÓÐÔÚÕâ¸öÍøÕ¾ÓÐÁгö SQL Ö¸ÁîµÄÓï·¨¡£ÈôÒª¸üÏ꾡µÄ˵Ã÷£¬ÇëµãÑ¡Ö¸ÁîÃû³Æ¡£
ÕâÒ»Ò³µÄÄ¿µÄÊÇÌṩһ¸ö¼ò½àµÄ SQL Óï·¨×öΪ¶ÁÕ߲ο¼Ö®Óá£ÎÒÃǽ¨ÒéÄúÏÖÔھͰ´ Control-D ½«±¾Ò³¼ÓÈëÄúµÄ¡ºÎÒµÄ×î°®¡»¡£
Select
SELECT "À¸Î»" from "±í¸ñÃû"
Distinct
SELECT DISTINCT "À¸Î»"
from "±í¸ñÃû"
Where
......

sql²éѯ×îºóÒ»ÌõÊý¾Ý

1¡¢ sql²éѯ×îºóÒ»ÌõÊý¾Ýselect * from table order by id DESC limit 1
2¡¢select top1 * from tablename where order by id desc
ͨ¹ýÔÚmysqlÖвâÊÔ£¬Ö»ÓеÚÒ»ÖÖ¿ÉÒÔʹÓ㬲»ÖªµÀÆäËûÊý¾Ý¿âÊÇ·ñÖ§³ÖµÚ¶þÖÖ·½·¨£¬ÍøÉϺܶàÈË˵ÓõڶþÖÖ·½·¨ ......

SQL Server 2005ÖеÄÎļþºÍÎļþ×é

 Author : wufeng4552                           Date   : 2009-10-23
1¡¢ÎļþºÍÎļþ×éµÄº¬ÒåÓë¹Øϵ
    ÿ¸öÊý¾Ý¿âÓÐÒ»¸öÖ÷Êý¾ÝÎļþ.ºÍÈô¸É¸ö´ÓÎÄ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ