Created
July 15, 2023 21:00
-
-
Save vnegi10/3f1a8031dbdb08c6df9a52634c3610a7 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function delete_rows(db_name::String, table_name::String, price::Float64) | |
conn_db = connect_db(db_name) | |
try | |
DBInterface.execute(conn_db, | |
"DELETE FROM $table_name WHERE Price > $price") | |
catch | |
error("Unable to delete from $table_name") | |
finally | |
DBInterface.close!(conn_db) | |
end | |
return nothing | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment