Config SQL Server for JDBC Access
1. In "MicroSoft SQL Server Management Studio", right click SQL Server instance, select "Properties", select "Security" in left panel and check "SQL Server and Windows Authentication mode" in right Panel.
2. In "SQL Server Configuration Manager", select "SQL Server Network Configuration > Protocols for XXX" in left panel and enable "TCP/IP" in the right panel.
3. Create a login account and add it to some role.
Ïà¹ØÎĵµ£º
SQLÓï¾äµÄÌí¼Ó¡¢É¾³ý¡¢ÐÞ¸ÄËäÈ»ÓÐÈçϺܶàÖÖ·½·¨£¬µ«ÔÚʹÓùý³ÌÖл¹ÊDz»¹»Ó㬲»ÖªÊÇ·ñÓиßÊְѸü¶àÁé»îµÄʹÓ÷½·¨¹±Ï׳öÀ´£¿
Ìí¼Ó¡¢É¾³ý¡¢ÐÞ¸ÄʹÓÃdb.Execute(Sql)ÃüÁîÖ´ÐвÙ×÷
╔----------------╗
¡î Êý¾Ý¼Ç¼ɸѡ ¡î
╚----------------╝
×¢Ò⣺µ¥Ë«ÒýºÅµÄÓ÷¨¿ÉÄÜÓÐÎó(ûÓвâʽ)
Sql = "S ......
in ºÍ existsÆäʵͦºÃÇø±ðµÄ.ÇÒ¿´Ï±߻ù±¾¸ÅÄî¡£
in ÊÇÒ»¸ö¼¯ºÏÔËËã·û.
a in {a,c,d,s,d....}
Õâ¸öÔËËãÖÐ,Ç°ÃæÊÇÒ»¸öÔªËØ,ºóÃæÊÇÒ»¸ö¼¯ºÏ,¼¯ºÏÖеÄÔªËØÀàÐÍÊǺÍÇ°ÃæµÄÔªËØÒ»ÑùµÄ¡£ÊµÏֵĶԼ¯ºÏÖеÄÔªËؽøÐбéÀú£¬ÒÔÈ·¶¨¸ø¶¨µÄÔªËØaÊÇ·ñÓë×Ó²éѯ»òÁбíÖеÄÖµÏàÆ¥Åä¡£
in ÔËËãÓÃÔÚsqlÓï¾äÖÐ,ËüºóÃæ´øµÄselect Ò»¶¨ÊÇÑ¡Ò»¸ ......
1:replace º¯Êý
µÚÒ»¸ö²ÎÊýÄãµÄ×Ö·û´®£¬µÚ¶þ¸ö²ÎÊýÄãÏëÌæ»»µÄ²¿·Ö£¬µÚÈý¸ö²ÎÊýÄãÒªÌæ»»³Éʲô
select replace('lihan','a','b')
&nb ......
ÔÚSQL*PlusÖÐĬÈϵÄ"&"±íʾÌæ´ú±äÁ¿£¬SQL*PlusÈÏΪ&·ûºóÃæµÄ×Ö·û´®Îª±äÁ¿£»Ö»ÒªÔÚÃüÁîÖгöÏָ÷ûºÅ£¬SQL*Plus¾Í»áÒªÄãÊäÈëÌæ´úÖµ¡£Õâ¾ÍÒâζ×ÅÄãÎÞ·¨½«Ò»¸öº¬Óи÷ûºÅµÄ×Ö·û´®²åÈë»ò¸üе½Êý¾Ý¿â
set define off ¹Ø±ÕÌæ´ú±äÁ¿¹¦ÄÜ£¬“&”½«×÷ΪÆÕͨ×Ö·û
set def ......
--oracleÓÅ»¯slqÓï¾ä
£¨1£©Ñ¡Ôñ×îÓÐЧÂʵıíÃû˳Ðò(Ö»ÔÚ»ùÓÚ¹æÔòµÄÓÅ»¯Æ÷ÖÐÓÐЧ)£º
¡¡¡¡OracleµÄ½âÎöÆ÷°´ÕÕ´ÓÓÒµ½×óµÄ˳Ðò´¦Àífrom×Ó¾äÖеıíÃû£¬from×Ó¾äÖÐдÔÚ×îºóµÄ±í(»ù´¡±í driving table)½«±»×îÏÈ´¦Àí£¬ÔÚfrom×Ó¾äÖаüº¬¶à¸ö±íµÄÇé¿öÏÂ,Äú±ØÐëÑ¡Ôñ¼Ç¼ÌõÊý×îÉٵıí×÷Ϊ»ù´¡±í¡£¼ÙÈçÓÐ3¸öÒÔÉ쵀 ......