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

ÀûÓÃÕýÔò±í´ïʽʵÏֵļòµ¥µÄÕûÀíSQLÎı¾µÄС¹¤¾ß

ÏÂÔØµØÖ·£º http://download.csdn.net/source/1805903
  private string ReArrange(string str)
{
string[] keywords = new string[] {"select","from","where","and","order\\s+by","or","into",
"update","set","delete","haveing","group\\s+by",
"inner\\s+join","left\\s+join","right\\s+join","on",","};
string reg_str1 = "";
string reg_str2 = "";
reg_str1 += "\\s+(?=\\b" + keywords[0] + "\\b)";
reg_str2 += "(?<=\\b" + keywords[0] + "\\b)\\s+";
for (int i = 1; i < keywords.Length; i++)
{
reg_str1 += "|\\s+(?=\\b" + keywords[i] + "\\b)";
reg_str2 += "|(?<=\\b" + keywords[i] + "\\b)\\s+";
}
Regex reg_sel_b = new Regex(reg_str1, RegexOptions.IgnorePatternWhitespace | RegexOptions.IgnoreCase | RegexOptions.Multiline);
Regex reg_sel_a = new Regex(reg_str2, RegexOptions.IgnorePatternWhitespace | RegexOptions.IgnoreCase | RegexOptions.Multiline);
return (reg_sel_a.Replace(reg_sel_b.Replace(str, Environment.NewLine), Environment.NewLine + new string (' ',4) ));

}


Ïà¹ØÎĵµ£º

ÈçºÎʹÓà 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 IN ת»¯Îª EXISTS µÄ·½·¨

·Ï»°ÉÙ˵,(ÒѾ­Óоä·Ï»°ÁË.)
¿´±í
 Óï¾ä: SELECT * from C
//---------------------------------------
Cno  Cname      Teacher
---- ---------- --------
1    ÓïÎÄ         Æî¾²   
2  &n ......

֪ʶС½á(PL/SQL)

1) ʱ¼äת»»º¯ÊýÖÐÈç¹ûÓÐʱ¼ä±äÁ¿yyyy-mm-ddÁ½±ßÐèÁ½''
to_date(''' || to_char(a_valid_date_end, 'yyyy-mm-dd') ||''', ''yyyy-mm-dd'')
2) select distinct(e.itemnum) bulk collect into v_itemnum
½«×Ö·û´®Êý×éÒÔ·Ö¸ô·û·Ö¸ôµÄ×Ö·û´®µ÷ÓÃ
pkg_maximo_common.get_string(v_itemnum, ',', '')
3) unionÖ»Êǽ«Á½¸ö½á¹ ......

·Àsql×¢ÈëÀà

 using System;
using System.Text.RegularExpressions;
using System.Web;
namespace FSqlKeyWord
{
/**//**//**//// <summary>
/// SqlKey µÄժҪ˵Ã÷¡£
/// </summary>
public class SqlKey
{
private HttpRequest request;
//private const string St ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ