Friday, March 15, 2019

Database Connectivity with Oracle

  1. Driver class: The driver class for the oracle database is oracle.jdbc.driver.OracleDriver.
  2. Connection URL: The connection URL for the oracle10G database is jdbc:oracle:thin:@localhost:1521:xe where jdbc is the API, oracle is the database, thin is the driver, localhost is the server name on which oracle is running, we may also use IP address, 1521 is the port number and XE is the Oracle service name. You may get all these information from the tnsnames.ora file.
  3. Username: The default username for the oracle database is system.
  4. Password: It is the password given by the user at the time of installing the oracle database.
create table emp(id number(10),name varchar2(40),age number(3));  

No comments:

Post a Comment