application.yml
spring:
application:
name: zplatform
datasource:
driver-class-name: oracle.jdbc.driver.OracleDriver
url: jdbc:oracle:thin:@主机号:端口号/数据库?characterEncoding=utf8&useSSL=false&serverTimezone=UTC&allowPublicKeyRetrieval=true&serverTimezone=GMT%2B8
username: 用户
password: 密码
pom.xml
<dependency>
<groupId>com.oracle.database.jdbc</groupId>
<artifactId>ojdbc8</artifactId>
<scope>12.2.0.1</scope>
</dependency>
<dependency>
<groupId>com.oracle.database.nls</groupId>
<artifactId>orai18n</artifactId>
<version>19.7.0.0</version>
oracle语句
//查询数据库中全部表
select * from tabs
//查询表的列
select column_name from user_tab_columns where table_name='表名'
//查询表的数据
select * from 表名
//查询表中数据的条数
SELECT count(*) FROM 表名
标签:jdbc,springBoot,表名,查询,oracle,使用,Oracle,select,name
From: https://www.cnblogs.com/XuBin23/p/17339865.html