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

shopxpÍøÉϹºÎïϵͳ v7.4´æÔÚSQL×¢È멶´

shopxpÍøÉϹºÎïϵͳ v7.4´æÔÚSql×¢È멶´¡£
ÎÊÌâÎļþ£ºxpCatalog_xpDesc.asp£¬xpCatalog_xpsmall_Desc.asp
ÎÊÌâ´úÂ룺
<%
dim shopxpbe_id, anclassname, shopxpse_id, nclassname
dim totalPut
dim CurrentPage, TotalPages
if request("shopxpbe_id")<>"" then
shopxpbe_id=request("shopxpbe_id")
else
shopxpbe_id=0
end if
if request("shopxpbe_id")="" then
shopxpbe_id=1
end if
if not isempty(request("page")) then
currentPage=cint(request("page"))
else
currentPage=1
end if
set rs=server.createobject("adodb.recordset")
rs.open "select * from shopxp_btype where shopxpbe_id="&amp;shopxpbe_id,conn,1,1
anclassname=rs("shopxpbe_name")
rs.close
%>
²¢Ã»ÓжÔshopxpbe_id½øÐÐÕûÐÎÅжϡ£ÏÂÃæÔÚ˵˵ËûµÄ·À×¢Èëϵͳ¡£ºÃÏñÊÇÍøÉϵķãÒ¶·À×¢Èë¡£¿´´úÂë°É£º
Dim Fy_Url,Fy_a,Fy_x,Fy_Cs(),Fy_Cl,Fy_Ts,Fy_Zx
Fy_Cl = 2 &apos;´¦Àí·½Ê½£º1=ÌáʾÐÅÏ¢,2=תÏòÒ³Ãæ,3=ÏÈÌáʾÔÙתÏò
Fy_Zx = "../" &apos;³ö´íʱתÏòµÄÒ³Ãæ
On Error Resume Next
Fy_Url=Request.ServerVariables("QUERY_STRING")
Fy_a=split(Fy_Url,"&amp;")
redim Fy_Cs(ubound(Fy_a))
On Error Resume Next
for Fy_x=0 to ubound(Fy_a)
Fy_Cs(Fy_x) = left(Fy_a(Fy_x),instr(Fy_a(Fy_x),"=")-1)
Next
For Fy_x=0 to ubound(Fy_Cs)
If Fy_Cs(Fy_x)<>"" Then
If Instr(LCase(Request(Fy_Cs(Fy_x))),"&apos;")<>0 or Instr(LCase(Request(Fy_Cs(Fy_x))),"and")<>0 or Instr(LCase(Request(Fy_Cs(Fy_x))),"select")<>0 or Instr(LCase(Request(Fy_Cs(Fy_x))),"update")<>0 or Instr(LCase(Request(Fy_Cs(Fy_x))),"chr")<>0 or Instr(LCase(Request(Fy_Cs(Fy_x))),"delete%20from")<>0 or Instr(LCase(Request(Fy_Cs(Fy_x))),";")<>0 or Instr(LCase(Request(Fy_Cs(Fy_x))),"insert")<>0 or Instr(LCase(Request(Fy_Cs(Fy_x))),"mid")<>0 Or Instr(LCase(Request(Fy_Cs(Fy_x))),"master.")<>0 Then
Select Case Fy_Cl
Ê¡ÂÔ²¿·Ö´úÂë
Õâ¸ö·À×¢ÈëϵͳÔÚÍøÉÏòËƺܻ𣬵«ÊÇËû·ÀµÄÊÇÓÐÎÊÌâµÄ¡£¹Ø¼üÊÇÕâ¾ä£¬Fy_Url=Request.ServerVariables("QUERY_STRING")£¬Request.ServerVariablesµÃµ½µÄÊý¾ÝÊÇÔ­ÑùµÄ£¬²¢²»»á½øÐÐURL½âÂë¡£ÕâÒ


Ïà¹ØÎĵµ£º

ÔÚSQL ServerÀï²é¿´µ±Ç°Á¬½ÓµÄÔÚÏßÓû§Êý

 ÔÚSQL ServerÀï²é¿´µ±Ç°Á¬½ÓµÄÔÚÏßÓû§Êý
use master
select loginame,count(0) from sysprocesses
group by loginame
order by count(0) desc
select nt_username,count(0) from sysprocesses
group by nt_username
order by count(0) desc
Èç¹ûij¸öSQL ServerÓû§ÃûtestÁ¬½Ó±È½Ï¶à,²é¿´ËüÀ´×ÔµÄÖ÷»úÃû:
......

¶¯Ì¬SQL»ù±¾Óï·¨

 Select * from tableName
exec('select * from tableName')
exec sp_executesql N'select * from tableName' -- Çë×¢Òâ×Ö·û´®Ç°Ò»¶¨Òª¼ÓN
2:×Ö¶ÎÃû£¬±íÃû£¬Êý¾Ý¿âÃûÖ®Àà×÷Ϊ±äÁ¿Ê±£¬±ØÐëÓö¯Ì¬SQL
declare @fname varchar(20)
set @fname = 'FiledName'
Select @fname from tableName -- ´íÎó,²»»áÌáʾ´í ......

ÏÂÃæÊÇÎÒËѼ¯µÄһЩ¾«ÃîµÄSQLÓï¾ä

ÏÂÃæÊÇÎÒËѼ¯µÄһЩ¾«ÃîµÄSQLÓï¾ä¡£
˵Ã÷£º¸´ÖƱí(Ö»¸´Öƽṹ,Ô´±íÃû£ºa бíÃû£ºb)
SQL: select * into b from a where 1<>1
˵Ã÷£º¿½±´±í(¿½±´Êý¾Ý,Ô´±íÃû£ºa Ä¿±ê±íÃû£ºb)
SQL: insert into b(a, b, c) select d,e,f from b;
˵Ã÷£ºÏÔʾÎÄÕ¡¢Ìá½»È˺Í×îºó»Ø¸´Ê±¼ä
SQL: select a.title,a.username,b.adddat ......

sqlÓï¾ä´´½¨³ÉµÇ¼

 1 windowsµÇ¼ÕË»§¿Ú£ºEXEC ap_grantlogin 'windowsÓòÃû\ÓòÕË»§'
 2 SQL µÇ¼ÕË»§:EXEC sp_addlogin 'ÕË»§Ãû','ÃÜÂë'
 3 ´´½¨Êý¾Ý¿âÓû§:exec spgrantdbaccess 'µÇ¼ÕË»§','Êý¾Ý¿âÓû§'
¶þ ¸øÊý¾Ý¿âÓû§ÊÚȨ
grant ȨÏÞ on ±íÃû to Êý¾Ý¿âÓû§ ......

Oracle³£ÓÃSqlÓï¾ä

1. ´´½¨ÊÓͼ£º
CREATE OR REPLACE VIEW SM_V_UNIT_AUTH AS
SELECT T2.UNIT_ID,
        T2.SUPER_UNIT_ID,
        T1.AUTH_ID,
        T1.AUTH_NAME,
        T1.A ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ