Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- library(RPostgres)
- library(DBI)
- library(dplyr)
- library(sqldf)
- pw<- {
- "password"
- }
- conn <- dbConnect(RPostgres::Postgres()
- , host="host-name"
- , port='5432'
- , dbname="database-name"
- , user="username"
- , password=pw)
- dbExistsTable(conn, "Test_Table")
- #TRUE
- dbListTables(conn)
- mydf <- dbReadTable(conn, "Test_Table") # To Read the table in R
- SELECT table_name FROM INFORMATION_SCHEMA.tables WHERE table_schema = ANY (current_schemas(false));
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement