r/SQL • u/deuvisfaecibusque • Aug 12 '26
Discussion Shebang equivalent for SQL dialects?
When writing shell scripts it's common to have on line 1
#!/bin/bash
which would differentiate it from
#!/bin/sh
I have a lot of SQL saved in text files — all .sql extension — for processing CSVs at work; these are all in-memory instances that ingest CSVs and output CSVs. For many years I only used SQLite so I only had to remember sqlite3 < query.sql.
Recently, I started writing for DuckDB as well, initially only because of its ability to load JSON/CSV from a URL; I'm also quickly seeing how advantageous its extra functions are.
Is there any shebang-style line that I can start my files with, or do I just need to write a freetext comment like this?
-- This is for DuckDB
View all comments
Show parent comment
1
u/deuvisfaecibusque Aug 12 '26
Thanks.
Point 1 is not really what I'm thinking of.
Point 2 is more the issue: I don't want to forget which dialect I was writing for and have to do detective work on years-old files; I was wondering if there was a "best practice"/standard way to indicate this.