Ò»¡¢Ñ¡ÔñÌâ
1. ÓйØJDBCµÄÑ¡ÏîÕýÈ·µÄÊÇÄÄÒ»¸ö£¿
A. JDBCÊÇÒ»ÖÖ±»Éè¼Æ³ÉͨÓõÄÊý¾Ý¿âÁ¬½Ó¼¼Êõ£¬JDBC¼¼Êõ²»¹â¿ÉÒÔÓ¦ÓÃÔÚJava³Ì
ÐòÀïÃ棬»¹¿ÉÒÔÓÃÔÚC++ÕâÑùµÄ³ÌÐòÀïÃæ¡£
B. JDBC¼¼ÊõÊÇSUN¹«Ë¾Éè¼Æ³öÀ´×¨ÃÅÓÃÔÚÁ¬½ÓOracleÊý¾Ý¿âµÄ¼¼Êõ£¬Á¬½ÓÆäËûµÄ
Êý¾Ý¿âÖ»ÄܲÉÓÃ΢ÈíµÄODBC½â¾ö·½°¸
C. ΢ÈíµÄODBCºÍSUN¹«Ë¾µÄJDBC½â¾ö·½°¸¶¼ÄÜʵÏÖ¿çƽ̨ʹÓã¬Ö»ÊÇJDBCµÄÐÔÄÜ
Òª¸ßÓÚODBC
D. JDBCÖ»ÊǸö³éÏóµÄµ÷Óù淶£¬µ×²ã³ÌÐòʵ¼ÊÉÏÒªÒÀÀµÓÚÿÖÖÊý¾Ý¿âµÄÇý¶¯Îļþ 2. Ñ¡ÔñJDBC¿ÉÒÔÖ´ÐеÄÓï¾ä£¨¶àÑ¡£© A. DDL B. DCL C. DML D. ÒÔÉ϶¼¿ÉÒÔ
3. Ñ¡ÔñJava³ÌÐò¿ª·¢ÖÐÍƼöʹÓõij£ÓÃÊý¾Ý¿â£¨¶àÑ¡£© a. Oracle
b. SQL Server 2000 c. MySQL d. DB2
4. Äĸö²»ÊÇJDBCÓõ½µÄ½Ó¿ÚºÍÀࣿ a. System b. Class c. Connection d. ResultSet
5. ʹÓÃConnection µÄÄĸö·½·¨¿ÉÒÔ½¨Á¢Ò»¸öPreparedStatement½Ó¿Ú£¿
A. createPrepareStatement() B. prepareStatement()
C. createPreparedStatement()
D. preparedStatement() 6. ÏÂÃæµÄÃèÊöÕýÈ·µÄÊÇʲô£¿
A. PreparedStatement¼Ì³Ð×ÔStatement B. Statement¼Ì³Ð×ÔPreparedStatement C. ResultSet¼Ì³Ð×ÔStatement
D. CallableStatement¼Ì³Ð×ÔPreparedStatement 7. ÏÂÃæµÄÃèÊö´íÎóµÄÊÇʲô£¿
A. StatementµÄexecuteQuery()·½·¨»á·µ»ØÒ»¸ö½á¹û¼¯
B. StatementµÄexecuteUpdate()·½·¨»á·µ»ØÊÇ·ñ¸üгɹ¦µÄbooleanÖµ C. ʹÓÃResultSetÖеÄgetString()¿ÉÒÔ»ñµÃÒ»¸ö¶ÔÓ¦ÓÚÊý¾Ý¿âÖÐcharÀàÐ͵Ä
Öµ
D. ResultSetÖеÄnext()·½·¨»áʹ½á¹û¼¯ÖеÄÏÂÒ»ÐгÉΪµ±Ç°ÐÐ 8. Èç¹ûÊý¾Ý¿âÖÐij¸ö×Ö¶ÎΪnumbericÐÍ,¿ÉÒÔͨ¹ý½á¹û¼¯ÖеÄÄĸö·½·¨»ñÈ¡£¿
A. getNumberic() B. getDouble() C. getBigDecimal () D. getFloat()
9. ÔÚJdbcÖÐʹÓÃÊÂÎñ,ÏëÒª»Ø¹öÊÂÎñÊÂÎñµÄ·½·¨ÊÇʲô£¿
A. ConnectionµÄcommit() B. ConnectionµÄsetAutoCommit() C. ConnectionµÄrollback() D. ConnectionµÄclose()
10. ÔÚJDBC±à³ÌÖÐÖ´ÐÐÍêÏÂÁÐSQLÓï¾äSELECT name, rank, serialNo
FROM employee£¬Äܵõ½rsµÄµÚÒ»ÁÐÊý¾ÝµÄ´úÂëÊÇÄÄÁ½¸ö£¿ A. rs.getString(0); B. rs.getString(\C. rs.getString(1);
D. rs.getString(\
11. ÏÂÃæ¹ØÓÚPreparedStatementµÄ˵·¨´íÎóµÄÊÇʲô
A. PreparedStatement¼Ì³ÐÁËStatement B. PreparedStatement¿ÉÒÔÓÐЧµÄ·ÀÖ¹SQL×¢Èë C. PreparedStatement²»ÄÜÓÃÓÚÅúÁ¿¸üеIJÙ×÷
D. PreparedStatement¿ÉÒÔ´æ´¢Ô¤±àÒëµÄStatement£¬´Ó¶øÌáÉýÖ´ÐÐЧÂÊ 12. ÏÂÃæµÄÑ¡Ïî¼ÓÔØMySQLÇý¶¯ÕýÈ·µÄÊÇÄÄÒ»¸ö£¿
A. Class.forname(\B. Class.forname(\C. Class.forname(\D. Class.forname(\13. ÏÂÃæµÄÑ¡Ïî¼ÓÔØMySQLÇý¶¯ÕýÈ·µÄÊÇÄÄÒ»¸ö£¿
A. Class.forname(\B. Class.forname(\C. Class.forname(\D. Class.forname(\14. ÏÂÃæ´úÂë¼ÓÔØOracleÇý¶¯ÕýÈ·µÄÊÇÄÄÒ»¸ö£¿
A. DriverManager.register(\B. DriverManager.forname(\C. DriverManager.load(\
D. DriverManager.newInstance(\15. ÓйØConnectionÃèÊö´íÎóµÄÊÇÄÄÒ»¸ö£¿
A. ConnectionÊÇJava³ÌÐòÓëÊý¾Ý¿â½¨Á¢µÄÁ¬½Ó¶ÔÏó£¬Õâ¸ö¶ÔÏóÖ»ÄÜÓÃÀ´Á¬½Ó
Êý¾Ý¿â£¬²»ÄÜÖ´ÐÐSQLÓï¾ä¡£
B. JDBCµÄÊý¾Ý¿âÊÂÎï¿ØÖÆÒª¿¿Connection¶ÔÏóÍê³É¡£
C. Connection¶ÔÏóʹÓÃÍê±ÏºóÒª¼°Ê±¹Ø±Õ£¬·ñÔò»á¶ÔÊý¾Ý¿âÔì³É¸ºµ£¡£ D. Ö»ÓÃMySQLºÍOracleÊý¾Ý¿âµÄJDBC³ÌÐòÐèÒª´´½¨Connection¶ÔÏó£¬ÆäËû
Êý¾Ý¿âµÄJDBC³ÌÐò²»Óô´½¨Connection¶ÔÏó¾Í¿ÉÒÔÖ´ÐÐCRUD²Ù×÷¡£
16. ÏÂÃæÓйØJDBCÊÂÎïµÄÃèÊöÕýÈ·µÄÊÇÄÄÒ»¸ö£¿
A. JDBCÊÂÎïĬÈÏΪ×Ô¶¯Ìá½»£¬Ã»Ö´ÐÐÒ»ÌõSQLÓï¾ä¾Í»á¿ªÆôÒ»¸öÊÂÎִÐÐÍê±Ï
Ö®ºó×Ô¶¯Ìá½»ÊÂÎÈç¹û³öÏÖÒì³£×Ô¶¯»Ø¹öÊÂÎï¡£
B. JDBCµÄÊÂÎﲻͬÓÚÊý¾Ý¿âµÄÊÂÎJDBCµÄÊÂÎïÒÀÀµÓÚJDBCÇý¶¯Îļþ£¬ÓµÓÐ
¶ÀÁ¢ÓÚÊý¾Ý¿âµÄÈÕÖ¾Îļþ£¬Òò´ËJDBCµÄÊÂÎï¿ÉÒÔÌæ´úÊý¾Ý¿âÊÂÎï¡£ C. Èç¹ûÐèÒª¿ªÆôÊÖ¶¯Ìá½»ÊÂÎïÐèÒªµ÷ÓÃConnection¶ÔÏóµÄstart()·½·¨¡£ D. Èç¹ûÊÂÎïûÓÐÌá½»¾Í¹Ø±ÕÁËConnectionÁ¬½Ó£¬ÄÇôJDBC»á×Ô¶¯Ìá½»ÊÂÎï¡£ 17. ÏÂÁеÄÔ¤±àÒëSQLÄÄÒ»¸öÊÇÕýÈ·µÄ£¿
A. SELECT * FROM £¿; B. SELECT ?,?,? FROM emp ;
C. SELECT * FROM emp WHERE salary>(?) D. ÒÔÉ϶¼²»¶Ô
18. ÄÜÖ´ÐÐÔ¤±àÒëSQLµÄÊÇÄÄÒ»¸öÑ¡Ï
A. Statement
B. PreparedStatement C. PrepareStatement D. ÒÔÉ϶¼²»ÊÇ
19. Èç¹ûΪÏÂÁÐÔ¤±àÒëSQLµÄµÚÈý¸öÎʺŸ³Öµ£¬ÄÇôÕýÈ·µÄÑ¡ÏîÊÇÄÄÒ»¸ö£¿
UPDATE emp SET ename=?,job=?,salary=? WHERE empno=?; A. pst.setInt(\B. pst.setInt(3,2000);
C. pst.setFloat(\D. pst.setString(\20. ÓйØPreparedStatement˵·¨ÕýÈ·µÄÊÇÄÄÒ»¸ö£¿
A. ¸Ã¶ÔÏóÖ»ÄÜÖ´ÐдøÎʺÅռλ·ûµÄÔ¤±àÒëSQL£¬²»ÄÜÖ´ÐÐSQLÓï¾ä¡£ B. ¸Ã¶ÔÏóÖ´ÐеÄʱºò£¬Ö»ÄÜÖ´ÐвéѯÓï¾ä£¬ÆäËûÔ¤±àÒëSQLÓï¾äÖ»ÄÜÓÉ
StatementÖ´ÐС£
C. ¸Ã¶ÔÏóÒòΪֻÄÜÖ´ÐвéѯÓï¾ä£¬ËùÒԸöÔÏó²»ÄÜÓÃÔÚJDBCÊÂÎïÖС£ D. ¸Ã¶ÔÏóÓëÒ»ÌõSQLÔ¤±àÒëÓï¾ä°ó¶¨£¬²»ÄÜÖ´ÐÐÆäËûÔ¤±àÒëSQLÓï¾ä¡£ 21. ÓйØÔ¤±àÒëSQLµÄÓеã˵·¨´íÎóµÄÊÇÄÄÒ»¸ö£¿
A. Ô¤±àÒëSQL¿ÉÒÔ±»PreparedStatement·´¸´Ö´ÐÐ
B. Ô¤±àÒëSQLÓï¾äÔÚPreparedStatement¶ÔÏó´´½¨Ö®ºó¾Í±»´«µÝ¸øÊý¾Ý¿â½â
Îö£¬Ö®ºóPreparedStatementÖ´ÐÐÔ¤±àÒëµÄʱºò£¬Æäʵ´«µÝ¸øÊý¾Ý¿âµÄÖ»ÓÐռλ·ûµÄ²ÎÊý¡£Èç¹ûÐèÒªÅúÁ¿²åÈë1000Ìõ¼Ç¼µÄʱºò£¬Ô¤±àÒëSQLÖ»±»Êý¾Ý¿â½âÎöÒ»´Î£¬ÆäÓ඼ÊÇÊý¾Ý¿â½ÓÊܲÎÊýÊý¾ÝÈ»ºóÖ´ÐУ¬ÕâÑùµÄËٶȴóΪÌá¸ß¡£ C. Ô¤±àÒëSQLµÄ°²È«ÐԺ㬿ÉÒÔµÖÓùÊý¾Ý¿â½Å±¾×¢Èë¹¥»÷£¬¶øÕâÈ´ÊÇStatement
Ëù²»¾ß±¸µÄ¡£
D. Ô¤±àÒëSQLµÄռλ·û¼È¿ÉÒÔÌæ´úÊý¾Ý±í£¬Ò²¿ÉÒÔÌæ´ú±í´ïʽµÄÊý¾Ý£¬ÉõÖÁÊÇ×Ó
²éѯÓï¾ä¡£
22. ÏÂÁÐÑ¡ÏîÓйØResultSet˵·¨´íÎóµÄÊÇÄÄÒ»¸ö£¿
A. ResultSetÊDzéѯ½á¹û¼¯¶ÔÏó£¬Èç¹ûJDBCÖ´ÐвéѯÓï¾äûÓвéѯµ½Êý¾Ý£¬ÄÇ
ôResultSet½«»áÊÇnullÖµ¡£
B. ÅжÏResultSetÊÇ·ñ´æÔÚ²éѯ½á¹û¼¯£¬¿ÉÒÔµ÷ÓÃËüµÄnext()·½·¨¡£ C. Èç¹ûConnection¶ÔÏó¹Ø±Õ£¬ÄÇôResultSetÒ²ÎÞ·¨Ê¹Óá£
D. Èç¹ûÒ»¸öÊÂÎïûÓÐÌá½»£¬ÄÇôResultSetÖÐÊÇ¿´²»µ½ÊÂÎï¹ý³ÌÖеÄÁÙʱÊý¾Ý¡£ 23. SELECT COUNT(*) FROM emp;ÕâÌõSQLÓï¾äÖ´ÐУ¬Èç¹ûÔ±¹¤±íÖÐûÓÐÈκÎÊý¾Ý£¬
ÄÇôResultSetÖн«»áÊÇʲôÑù×Ó£¿ A. null B. ÓÐÊý¾Ý
C. ²»Îªnull£¬µ«ÊÇûÓÐÊý¾Ý D. ÒÔÉ϶¼Ñ¡Ï²»¶Ô
24. ÏÂÃæÑ¡ÏîµÄMySQLÊý¾Ý¿âURLÕýÈ·µÄÊÇÄÄÒ»¸ö£¿
A. jdbc:mysql://localhost/company B. jdbc:mysql://localhost:3306:company C. jdbc:mysql://localhost:3306/company D. jdbc:mysql://localhost/3306/company
25. ±àдJDBCµÄʱºòÏÂÁÐÑ¡ÏîÄÄÒ»¸ö´íÎóµÄʹÓÃÁËij¸ö°üµÄÀࣿ
A. java.sql.Connection B. java.sql.Statement
C. java.sql.PreparedStatement D. java.sql.Driver ¶þ¡¢±à³ÌÌâ
¶àÄêÒÔÀ´£¬ÎÒ¹úµÄÆ¡¾ÆÉú²úÆóÒµÒ»Ö±ÊÇȺÐÛ¸î¾Ý¡¢¸÷×ÔΪսµÄ¾ÖÃæ¡£¸÷µØ¶¼ÓÐ×Ô¼ºµÄÉú²úÆóÒµ£¬ËüÃÇÊܵ½µØ·½Ö÷ÒåµÄ±£»¤£¬ÆóÒµ¹æģС£¬¾ÓªÒµ¼¨²»¼Ñ£¬µÖÓùÊг¡·çÏÕµÄÄÜÁ¦²î¡£½ü¼¸ÄêÀ´£¬ÕâÖÖ¸ñ¾ÖÕýÔÚ±»´òÆÆ£¬¹úÄÚµÄһЩơ¾Æ¾ÞÍ·£¬ÈçÇൺơ¾Æ¡¢Ñྩơ¾ÆµÈ£¬¿ªÊ¼½øÐпçµØÇøµÄ´ó¹æÄ£ÖØ×飬¶ÔÊг¡½øÐÐÖØÐÂÕûºÏ£¬Öð²½À©´óÆóÒµµÄÉú²ú¹æÄ££¬ÐγÉеÄÊг¡¾ºÕùÓÅÊÆ£¬±ÈÈ磬Çൺơ¾ÆÄ¿Ç°ÔÚ¹úÄÚÒÑÓÐ48¼ÒÉú²úÆóÒµ¡£
Æ¡¾ÆµÄÉú²úºÍÏúÊÛËùÐèµÄʱ¼äÏà¶ÔÒ²±È½Ï¶Ì£¬¿â´æÁ¿±È½ÏµÍ¡£ÔÒòÊÇÆ¡¾ÆÔÚ¶Ìʱ¼äÄÚ¿ÉÄÜ»á±äÖÊ£¬¶ø¿â´æ·ÑÓúÍÉú²ú·ÑÓÃÏà¶ÔÒ²±È½Ï¸ß¡£Òª¼õÉÙ¿â´æÁ¿£¬ÓÖÒª±£³Ö½ÏÇ¿µÄÊг¡¾ºÕùÄÜÁ¦£¬¾ÍÐèÒª¶ÔÉú²úºÍÐèÇóÁ¿µÄ±ä»¯×ö³öѸËÙ·´Ó¦¡£Õâ¾ÍÒªÇó¶ÔÐèÇóÁ¿×ö³ö¿ÆѧµÄÔ¤²â£¬ÒÔ×÷ΪÖƶ¨ÏÂÒ»Äê¶ÈÉú²ú¼Æ»®µÄÒÀ¾Ý¡£
Äþ²¨Ò»¼ÒÆ¡¾ÆÉú²úÆóÒµÏÖÕý×ÅÊÖÖƶ¨2009ÄêµÄÉú²ú¼Æ»®£¬Õâ¾ÍÐèÒª¶ÔÊг¡ÐèÇóÁ¿×ö³öÔ¤²â£¬×÷ΪÖƶ¨¼Æ»®µÄ²Î¿¼ÒÀ¾Ý¡£¾ÀíÊÒÒªÇó²ÆÎñ²¿¸ºÔð²âË㹤×÷£¬²¢Ìá³öÔ¤²âÊý¾Ý¡£¼Æ»®²ÆÎñ²¿ÈÏΪÆóÒµ×î½üÊ®ÎåÄêµÄÏúÊÛÊý¾Ý¶ÔÔ¤²âÓÐÓã¬ÓÚÊÇÕÒÀ´ÆóÒµÀúÄêµÄÏúÊÛÊý¾ÝÈçÏÂ±í£º Ðò ºÅ 1 2 3 4 5 6 7 8 9 10 11 12 Äê ·Ý 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 ¼¾ ¶È £¨µ¥Î»£ºÍò¶Ö£© Ò» 6 9 13 15 18 22 23 25 30 29 30 29 ¶þ 7 12 14 18 20 24 26 32 38 39 39 42 Èý 9 13 17 19 24 29 32 37 42 50 51 55 ËÄ 8 10 13 14 19 23 24 26 30 35 37 38 ºÏ ¼Æ 30 44 57 66 81 98 105 120 140 153 157 164 13 14 15 2007 2008 2009 31 33 34 43 45 46 54 58 60 41 42 45 169 178 185 ±àд³ÌÐòÍê³ÉÈçÏÂÒªÇó£º
1. ±àдJDBC³ÌÐò´´½¨Êý¾Ýoutput±í£¬±í½á¹¹ÈçÏÂ
ÁÐÃû num year q1 Êý¾ÝÀàÐÍ number(10) Ö÷¼ü ÊÇ ·Ç¿Õ ÊÇ ÊÇ Î¨Ò» ÊÇ Ë÷Òý ÊÇ ±¸×¢ ÐòºÅ Äê·Ý µÚÒ»¼¾²úÁ¿ number(4) number(10) number(10) number(10) number(10) number(10) q2 q3 q4 total ÊÇ ÊÇ ÊÇ ÊÇ µÚ¶þ¼¾²úÁ¿ µÚÈý¼¾²úÁ¿ µÚËļ¾²úÁ¿ Äê²úÁ¿ 2. ±àдJDBC³ÌÐò½«±í1ÖеÄÊý¾Ý²åÈëµ½Êý¾Ý¿â£¬ÒªÇóʹÓÃÕûÌåÐÔÊÂÎñ£¬²»ÊÇû²åÈëÒ»ÌõÌá½»Ò»´ÎÊÂÎñ¡£
3. ±àдJDBC³ÌÐò¶ÁÈ¡Êý¾Ý¿âÖеÄÊý¾Ý£¬ÔÚ¿ØÖÆ̨Êä³öÄêÔö³¤Á¿µÄƽ¾ùÖµ
4. ÀûÓÃÊý¾Ý±íÖÐ×î½üËÄÄêµÄÊý¾ÝÔ¤²âδÀ´ÎåÄêÖÐÿÄêÆ¡¾ÆµÄ²úÁ¿Êý¾Ý£¨Ëĸö¼¾¶ÈºÍ×ܲúÁ¿£©£¬Êä³öµ½¿ØÖÆ̨ÉÏÃæ¡£
5. Óû§ÔÚ¿ØÖÆ̨ÉÏÃæÊäÈëÒ»¸öÈÎÒâµÄÄê·Ý£¬½«¸ÃÄêµÄ¼Ç¼´òÓ¡µ½¿ØÖÆ̨ÉÏÃ棬ÐèÒªÊä³öÄê·Ý¡¢Ëĸö¼¾¶ÈµÄ²úÁ¿ºÍÄê×ܲúÁ¿
(1) Èç¹ûÓû§ÊäÈëµÄÊÇ1995ÄêÒÔÇ°µÄÄê·Ý£¬¿ØÖÆ̨Êä³ö¡°Ã»ÓÐÊý¾Ý¡±
(2) Èç¹ûÓû§ÊäÈëµÄÊÇ1995-2009ÄêÖ®¼äµÄÄê·Ý£¬Êä³öµÄÊý¾Ý´ÓÊý¾Ý¿âÖвéѯ (3) Èç¹ûÊäÈëµÄÊÇ2009ÄêÒÔºóµÄÄê·Ý£¬Êä³öµÄÊý¾ÝÊÇÔ¤²âµÄÊý¾Ý£¨²Î¼ûµÚËÄÌâµÄ˼·£©