下载后可任意编辑吉大《数据库应用技术》在线作业一答案试卷总分: 100 测试时间: --试卷得分: 100单选题一、 单选题( 共 25 道试题, 共 100 分。) 得分: 100V1.Giventhefollowingtable:TestTableC1-----------12345AndifthefollowingCLIcallsaremade:SQLAllocHandle(SQL_HANDLE_ENV,SQL_NULL_HANDLE,&henv);SQLSetEnvAttr(henv,SQL_ATTR_ODBC_VERSION,(SQLPOINTER)SQL_OV_ODBC3,0);SQLAllocHandle(SQL_HANDLE_DBC,henv,&hdbc);SQLConnect(hdbc,(SQLCHAR*)"db",SQL_NTS,(SQLCHAR*)"userid",SQL_NTS,(SQLCHAR*)"password",SQL_NTS);SQLSetConnectAttr(hdbc,SQL_ATTR_AUTOCOMMIT,SQL_AUTOCOMMIT_OFF,0);SQLAllocHandle(SQL_HANDLE_STMT,hdbc,&hstmt);SQLPrepare(hstmt,(unsignedchar*)"select*fromTestorderbyC1',SQL_NTS);SQLBindCol(hstmt,1,SQL_C_SHORT,&data,0,NULL);SQLExecute(hstmt);SQLFetch(hstmt);printf(Data:%i\n",data);SQLFetch(hstmt);printf(Data:%i\n",data);SQLFetch(hstmt);printf(Data:%i\n",data);下载后可任意编辑SQLEndTran(SQL_HANDLE_ENV,henv,SQL_COMMIT);SQLFetch(hstmt);printf(Data:%i\n",data);Whichofthefollowingwillbereturnedbytheprogram?A.Data:1Data:2Data:3Data:3B.Data:1Data:2Data:3Data:4C.Data:1Data:2Data:3Data:1D.Data:1Data:2Data:3Data:5满分: 4 分得分: 42.Giventhecode:EXECSQLDECLAREcursor1CURSORFORSELECTname,age,b_dateFROMperson;EXECSQLOPENcursor1;Underwhichofthefollowingsituationswilltheabovecursorbeimplicitlyclosed?A.WhenaCLOSEstatementisissuedB.WhenaCOMMITstatementisissuedC.WhentherearenorowsintheresultsetD.WhenallrowsareFETCHedfromtheresultset满分: 4 分得分: 43.Giventheapplicationcode:EXECSQLDECLAREcurCURSORWITHHOLDFORSELECTc1FROMt1EXECSQLOPENcurEXECSQLFETCHcurINTO:hv/*Statement1*/EXECSQLCOMMIT/*Statement2*/EXECSQLFETCHcurINTO:hv/*Statement3*/EXECSQLROLLBACK/*Statement4*/下载后可任意编辑EXECSQLCLOSEcur/*Statement5*/IfthetableT1hasnorowsinit,whichstatementwillcausethecursor"cur"tobeclosedfirst?A.Statement1B.Statement2C.Statement3D.Statement4满分: 4 分得分: 44.HowmanyrowscanberetrievedusingasingleSELECTINTOstatement?A.OnlyonerowB.AsmanyasareintheresultC.AsmanyasarehostvariablesusedinthecallD....