文档介绍:java笔试考题2 (java笔试考题2)
the following statement about PreparedStatement is wrong: 0.
PreparedStatement is the sub interface of Statement.
using PreparedStatement pre compiled SQL can effectively prevent SQL injection.
PreparedStatement has the function of batch processing SQL.
The setXXX method of D. PreparedStatement can be used to set the reserved table name, field name and other parameters.
the following description of the sequence is incorrect:()
The A. sequence, like tables, is an object in the Oracle database
The value genera ted by the B. sequence can be used as the primary key value of the table
The best way for C. to use sequences is that multiple tables can share one sequence to reduce the number of Oracle database sequences
MySql data does not support sequences
the following methods are used to define the execution of the thread:
start ()
init ()
run ()
synchronized ()
the following existing built table SQL statement: CREATE TABLE departments (departmentid NUMBER PRIMARY KEY department^name (4), VARCHAR2 (20), city VARCHAR2 (20), province VARCHAR2 (20)) the insert statement is correct: (a).
INSERT INTO departments VALUES (300, 'ABC');
(department_name, department_id)
(department_name, city) VALUES
INSERT INTO departments VALUES (300, 5 design ):
INSERT INTO departments (' design , ' BJ');
INSERT INTO departments VALUES (300, 'ABC', null, null);
the running result of the following code is (). Public class TestOne implements Runnable static void main {public (String[] args) throws Exception t Thread {Thread = new (new (TestOne));
t. start () ; System. out. print ("Started") ; (t. join);
System. ("Complete");} public (void run) {for (int i =0 < 4; I: i++) {Sys tem. out .prin t}}} (I):
StartedComplete
StartedComplete0123
Started0123Complete
0123StartedComplete
analysis of the following code, the correct syntax of the Sql statement is ().
SELECT class, COUNT (stuld) FROM students WHERE stuAge>18 GROUP BY class HAVIN