Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.


  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

Chapter 15. Running SQL Using Java > Importing the JDBC Packages

Importing the JDBC Packages

In order for your programs to use JDBC, you must import the required JDBC packages into your Java programs. There are two sets of JDBC packages: the standard JDBC packages from Sun Microsystems and Oracle’s extension packages. The standard JDBC packages enable your Java programs to access the basic features of most databases, including the Oracle database, SQL Server, DB2, and MySQL. The Oracle extensions to JDBC enable your programs to access all of the Oracle-specific features, as well as the Oracle-specific performance extensions. You’ll learn about some of the Oracle-specific features later in this chapter.

To use JDBC in your programs you should import the java.sql.* packages, as shown in the following import statement:


  

You are currently reading a PREVIEW of this book.

                                                                                        

Get instant access to over
$1 million worth of books and videos.

  

Start a Free Trial