Learn R Programming

nhlscrape (version 0.1.3)

QueryDb: Send query to database

Description

Send a SQL query to the database. Retruns the SQL result as a data.frame. Useful for seeing the structure of the database for construction of queries

Usage

QueryDb(query)

Arguments

query

A string containing the SQL query

Value

List, contains the SQL query result.

Examples

Run this code
# NOT RUN {
SetDbPath(example = TRUE)
AddGameEvents(2019020001)
QueryDb("SELECT * FROM events")
QueryDb("SELECT result_description FROM events WHERE game_id=2019020001 AND player_id=8475166")

# }

Run the code above in your browser using DataLab