jdbcÁ¬½Ósql server
import java.sql.*;
public class JdbcUtil
{
public static void close(Statement st, Connection con)
{
try
{
st.close();
}catch(Exception e)
{
}
try
{
con.close();
}catch(Exception e)
{
}
}
public static void close(ResultSet rs, Statement st, Connection con)
{
try
{
rs.close();
}catch(Exception e)
{
}
close(st, con);
}
public static Connection getConnection() throws Exception
{
Class.forName("com.microsoft.jdbc.sqlserver.SQLServerDriver").newInstance();
return DriverManager.getConnection("jdbc:microsoft:sqlserver://localhost:1433;DatabaseName=db", "sa", "54321");
}
}
Ïà¹ØÎĵµ£º
ORACLE SQLÐÔÄÜÓÅ»¯ÏµÁÐ
1. ·ÃÎÊTableµÄ·½Ê½
ORACLE ²ÉÓÃÁ½ÖÖ·ÃÎʱíÖмǼµÄ·½Ê½:
a. È«±íɨÃè
È«±íɨÃè¾ÍÊÇ˳ÐòµØ·ÃÎʱíÖÐÿÌõ¼Ç¼. ORACLE²ÉÓÃÒ»´Î¶ÁÈë¶à¸öÊý¾Ý¿é(database block)µÄ·½Ê½ÓÅ»¯È«±íɨÃè.
b. ͨ¹ýROWID·ÃÎʱí
Äã¿ÉÒÔ²ÉÓûùÓÚROWIDµÄ·ÃÎÊ·½Ê½Çé¿ö,Ìá¸ß·ÃÎʱíµÄЧÂÊ, , ROWID°üº¬Á˱íÖмǼµ ......
insert into Country123 ([Country_Id], [Region_ID], [Country_EN_Name], [Country], [Country_ALL_ID], [Country_Order_Id]) select [Country_Id], [Region_ID], [Country_EN_Name], [Country], [Country_ALL_ID], [Country_Order_Id] from openrowset( 'Microsoft.Jet.OLEDB.4.0', 'EXCEL 5.0;HDR=YES;IMEX=1; DATABASE= ......
ÎÒÃÇÔÚÊý¾Ý¿âÖÐʹÓñíµÄʱºò,¾³£»áÓöµ½Á½ÖÖʹÓñíµÄ·½·¨,·Ö±ð¾ÍÊÇʹÓÃÁÙʱ±í¼°±í±äÁ¿¡£ÔÚʵ¼ÊʹÓõÄʱºò£¬ÎÒÃÇÈçºÎÁé»îµÄÔÚ´æ´¢¹ý³ÌÖÐÔËÓÃËüÃÇ£¬ËäÈ»ËüÃÇʵÏֵŦÄÜ»ù±¾ÉÏÊÇÒ»ÑùµÄ£¬¿ÉÈçºÎÔÚÒ»¸ö´æ´¢¹ý³ÌÖÐÓÐʱºòȥʹÓÃÁÙʱ±í¶ø²»Ê¹Óñí±äÁ¿£¬ÓÐʱºòȥʹÓñí±äÁ¿¶ø²»Ê¹ÓÃÁÙʱ±íÄØ?
¡¡¡¡ÁÙʱ±í
¡¡¡¡ÁÙʱ±íÓëÓÀ¾Ã±íÏàËÆ£¬ ......
ÈκÎÒ»ÖÖʹÓÃÊý¾Ý¿âweb³ÌÐò£¨µ±È»£¬Ò²°üÀ¨×ÀÃæ³ÌÐò£©¶¼Óб»SQL×¢ÈëµÄ·çÏÕ¡£·ÀÖ¹±»SQL×¢È룬×î»ù±¾µÄ·½·¨ÊÇÔÚ´úÂ뼶±ð¾ÍÒª×èÖ¹ÕâÖÖ¿ÉÄÜ£¬Õâ¸öÍøÉϽ²µÄºÜ¶à£¬ÎҾͲ»¶à˵ÁË¡£²»¹ýÈç¹ûÄãÄõ½µÄÊÇÒ»¸öÒѾÍ깤µÄ²úÆ·£¬Õâ¸öʱºò¸ÃÈçºÎ½â¾öÄØ£¿ÎÒ½éÉܼ¸ÖÖ¶ÔÓÚASPºÍASP.NETÓÐЧµÄ·ÀÖ¹SQL×¢ÈëµÄ·½°¸£¬¶øÇÒÊÇÃâ·ÑµÄ¡£
UrlScan 3.1
......
Aaron Bertrand
Adam Machanic
All Things SQL Server
Allen Kinsel - SQL DBA
Allen White
Amit Bansal writes...
Andrew Fryer's Blog
Andrew Kelly
Andy Leonard
Anything and Everything IT
Arcane Code
Arnie Rowland: Ramblings of a Harried Technogeek
B.I. for the SQL Guy
Bart Duncan's SQL Weblog ......