Make-up homework for April 19

April 19th classwork supplement

Summary of relevant knowledge points

  • Sequential query:

    The ResultSet object can only see one data row at a time. Use the next() method to move to the next data row. The initial query position of the next() method, that is, the cursor position, is located in front of the first row. The `next() method moves the cursor downward (backward, in the direction of the larger data row number), and returns true if the move is successful, otherwise returns false.
  • To get a scrollable result set, use the following method to get a Statement object:

    Statement stmt = con.createStatement(int type ,int concurrency);
  • Condition and sort query:

    where sub-statement
    General format:
    select field from table name where condition
    field value and fixed value comparison
    field value in a certain range

Supplementary class content:




11.1-11.10 Code

https://gitee.com/BESTI-IS-JAVA-2018/20165213zqh/tree/master/20165213exp1/src/4.19 (class code )
https://gitee.com/BESTI-IS-JAVA-2018/20165213zqh/tree /master/src/chapter11 (codes for after-school exercises are added to the book )

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=324606221&siteId=291194637