This function reads and returns all the rows from a specified table in the database. It uses DBI::dbReadTable() to extract the contents of the table and return them as a data frame.

get_tbl(con = NULL, tbl = NULL)

Arguments

con

A DBI connection object returned by DBI::dbConnect(). This connection is used to interact with the database.

tbl

A character string specifying the name of the target table in the database.

Value

A data frame containing all rows and columns from the specified table. If the table is empty or does not exist, an error or empty data frame will be returned.