JDBC Operations Oracle Database--A small summary of the actual operation process

Source: Internet
Author: User

1, to the database, the table of each row of data record additions and deletions to change

Add: INSERT into Table name values ()

Delete: Delete table name where condition (id=? )

Change: Update table name set column name =? Where Condition (id=? )

Check: Select column name from table name where id=? Look up a piece of information

Select Column name from table name order by ID check all information

2. ResultSet result set

is an interface that points to a pointer to the current data row, starting at the first row of the column name, the. Next () method moves the pointer to the next line, points to each row of data, and each row of data is an object, so there is an object with one in it.

With while traversal, is a row of data a row of data traversal, and finally become an object, not a hodgepodge, porridge.

3, forget what is called JDBC, from where, what role?

JDBC is Java itself, in the java.sql package, written in the Java language

Role: Connect to the database

Java provides interfaces. Database vendor provides implementation class (driver)

4, PreparedStatement

has been precompiled and executed faster than statement

is an interface that inherits from the statement interface

When writing SQL statements, the parameter value is not directly written as value, but instead is replaced by a placeholder.

After you bind the parameter, setxxx ()

Then iterate over the result set and give the data to someone else so that you can return the complete object.

JDBC Operations Oracle Database--A small summary of the actual operation process

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.