Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SQLite now supports FULL JOINS #1150

Closed
hadley opened this issue Feb 11, 2023 · 1 comment · Fixed by #1152
Closed

SQLite now supports FULL JOINS #1150

hadley opened this issue Feb 11, 2023 · 1 comment · Fixed by #1152

Comments

@hadley
Copy link
Member

hadley commented Feb 11, 2023

library(DBI)

con <- dbConnect(RSQLite::SQLite())
dbWriteTable(con, "df1", data.frame(x = c(1, 2)))
dbWriteTable(con, "df2", data.frame(x = c(2, 3)))

dbGetQuery(con, "SELECT COALESCE(df1.x, df2.x) FROM df1 FULL JOIN df2 ON df1.x = df2.x")
#>   COALESCE(df1.x, df2.x)
#> 1                      1
#> 2                      2
#> 3                      3

Created on 2023-02-11 with reprex v2.0.2

And it's no longer mentioned in https://www.sqlite.org/omitted.html

@mgirlich
Copy link
Collaborator

And also RIGHT JOIN, for more than half a year already. I like them mentioning "long overdue":

Add (long overdue) support for RIGHT and FULL OUTER JOIN.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants