aspÍøÒ³Àï,sql³£ÓòÙ×÷Óï¾ä!
Ìí¼Ó¡¢É¾³ý¡¢ÐÞ¸ÄʹÓÃ
db.Execute(Sql)ÃüÁîÖ´ÐвÙ×÷
╔----------------╗
¡î Êý¾Ý¼Ç¼ɸѡ ¡î
╚----------------╝
×¢Ò⣺µ¥Ë«ÒýºÅµÄÓ÷¨¿ÉÄÜÓÐÎó(ûÓвâʽ)
Sql = "Select
Distinct
×Ö¶ÎÃû from Êý¾Ý±í"
Distinctº¯Êý£¬²éѯÊý¾Ý¿â´æ±íÄÚ²»Öظ´µÄ¼Ç¼
Sql = "Select Count(*) from Êý¾Ý±í where
×Ö¶ÎÃû1>#18:0:0# and ×Ö¶ÎÃû1< #19:00# "
countº¯Êý,²éѯÊý¿â±íÄÚÓжàÉÙÌõ¼Ç¼£¬“×Ö¶ÎÃû1”ÊÇָͬһ×Ö¶Î
Àý£º
set rs=conn.execute("select count(id) as idnum from news")
response.write rs("idnum")
sql="select * from Êý¾Ý±í where ×Ö¶ÎÃû between Öµ1 and
Öµ2"
Sql="select * from Êý¾Ý±í where ×Ö¶ÎÃû between
#2003-8-10# and #2003-8-12#"
ÔÚÈÕÆÚÀàÊýֵΪ2003-8-10 19:55:08
µÄ×Ö¶ÎÀï²éÕÒ2003-8-10ÖÁ2003-8-12µÄËùÓмǼ£¬¶ø²»¹ÜÊǼ¸µã¼¸·Ö¡£
select * from tb_name where datetime between #2003-8-10# and
#2003-8-12#
×Ö¶ÎÀïÃæµÄÊý¾Ý¸ñʽΪ£º2003-8-10
19:55:08£¬Í¨¹ýsql²é³ö2003-8-10ÖÁ2003-8-12µÄËùÓмͼ£¬¶ø²»¹ÜÊǼ¸µã¼¸·Ö¡£
Sql="select * from Êý¾Ý±í where ×Ö¶ÎÃû=×Ö¶ÎÖµ order by
×Ö¶ÎÃû [desc]"
Sql="select * from Êý¾Ý±í where ×Ö¶ÎÃû like ’’%×Ö¶ÎÖµ%’’
order by ×Ö¶ÎÃû [desc]"
Ä£ºý²éѯ
×¢Ò⣺mysqlÓëORACLEÊý¾Ý¿â´æÔÚ²»Í¬
Sql="select
top 10
*
from Êý¾Ý±í where ×Ö¶ÎÃû order by ×Ö¶ÎÃû [desc]"
Sql="select *fromÊý¾Ý±íwhere×Ö¶ÎÃûorder by×Ö¶ÎÃû[desc]
limit
10
"
²éÕÒÊý¾Ý¿âÖÐÇ°10¼Ç¼
Sql="select top n * form Êý¾Ý±í order by newid()"
Ëæ»úÈ¡³öÊý¾Ý¿âÖеÄÈô¸ÉÌõ¼Ç¼µÄ·½·¨
top n£¬n¾ÍÊÇҪȡ³öµÄ¼Ç¼Êý
Sql="select * from Êý¾Ý±í where ×Ö¶ÎÃû in
(’’Öµ1’’,’’Öµ2’’,’’Öµ3’’)"
╔----------------╗
¡î Ìí¼ÓÊý¾Ý¼Ç¼ ¡î
╚----------------╝
sql="insert into Êý¾Ý±í (×Ö¶Î1,×Ö¶Î2,
Ïà¹ØÎĵµ£º
1,ÏÔʾÓαêµÄ²Ù×÷
(1) ¶¨ÒåÓαê
¸ù¾Ý²éѯµÄÊý¾ÝÇé¿ö£¬ÔÚPL/SQL¿éµÄÉùÃ÷²¿·Ö¶¨ÒåÓα꣬Ó﷨Ϊ£º
cursor cursor_name is select_statement;
×¢Ò⣺
Óαê±ØÐëÔÚPL/SQL¿éµÄÉùÃ÷²¿·Ö½øÐж¨Ò壻
......
SQL Server µÄÄ£Äâ
רÀ¸×÷¼Ò£ºDeanna Dicken 2010Äê2ÔÂ12ÈÕ
·Ò룺 UltraDBA 2010Äê5ÔÂ25ÈÕ
ÔÌûµØÖ·£ºhttp://www.databasejournal.com/features/mssql/article.php/3863516/SQL-Server-Impersonation.htm
½éÉÜ
SQL Server µÄÄ£Ä⣬»òÉÏÏÂÎÄÇл»£¬ÊÇÒ»ÖÖ·½Ê½£¬ÔÊÐíµ± ......
ÐÞ¸ÄÄÚÈÝ£ºÉ¾³ýÔÀ´µÄTIMEά¶È£¬Ð½¨TIMEά¶È£¬ÐÞ¸ÄSALESÁ¢·½¡£
Êý¾Ý²åÈ룺
1£¬ÊÂʵÊý¾Ý²åÈ룺ͨ¹ýDTS¼Óµ÷¶ÈʵÏÖ½«sales_fact_1997µÄÊý¾Ý½øÐи´ÖÆ¡£ÆµÂÊΪÿ·ÖÖÓ10000Ìõ¡£ &nb ......
<%
Const New_img=10
set rs_Product=server.createobject("adodb.recordset")
sqltext="select top " & New_img & " * from 0791idc_Product order by ID"
rs_Product.open sqltext,conn,1,1
if not rs_Product.EOF then%>
<div align='center' id='demo' style='o ......
Õ⼸ÌìºÃ¶àÈËÎÊÎÒÈçºÎÔÚasp³ÌÐòÖпØÖÆÉãÏñÍ·È¥×¥ÅÄÕÕƬ£¬asp¼¼Êõ»¹ÊÇ99ÄêµÄʱºò¿´¹ýÒ»µãµã£¬Ôç¾Í×ÅÃ×·¹³ÔÁË£¬²»¹ý¼ÈÈ»ÓÐÈËÎÊ£¬ÄǾÍÊÇ¿´µÃÆðÔÛ£¬»¨ÁËÒ»¸öÍíÉϵÄʱ¼ä°Ñasp³ÌÐòµ÷ÓÃÉãÏñÍ·ÅÄÕÕµÄÎÊÌâ¸ã¶¨ÁË£¬ÏּǼÈçÏ£¬ÈÃÓÐÀàËÆÐèÇóµÄͬѧ¿ÉÒÔÉÙ×ßЩÍä·¡£
Óõ½µÄ¼¼Êõ£º
1.asp³ÌÐòÖÐ×÷base64±àÂëºÍ½âÂ룬ʹÓõÄÊÇmsxml×é¼þ£ ......