RUN-SQL(1)
π RUN-SQL(1) π
okay bestie, so this page lives in the User Contributed Perl Documentation section (yes, the cute little corner of the manual where perl people drop their scripts) π
and it's literally just run-sql.pl doing your database bidding. no cap.
β¨ NAME β¨
run-db.pl β Run SQL π¦
(yeah the file says run-db.pl here but every example below says run-sql.pl. that's just how it is. we don't fix it, we report it. π)
β¨ SYNOPSIS β¨
three whole ways to use this thing, pick your fighter:
run-sql.pl "select * from mytable where 1=0"
run-sql.pl --sql create-table.sql
echo "select * from mytable where 1=0" | run-sql.pl
like, you can pass the SQL as an argument, point it at a file with --sql, or just pipe it in like the main character you are π
β¨ ABSTRACT β¨
This sets up the database. The following options are recognized:
(that's it, that's the abstract. short and iconic. π)
β¨ OPTIONS β¨
--userUSERNAME β who you are, according to the database π«Ά--passwordPASSWORD β the secret. keep it secret. keep it safe π--dsnDSN β The DBI DSN to use for connecting to the database π--sqlSQLFILE β The alternative SQL file to use instead of what is passed on the command line. so like, file instead of shouting your query directly at it π--quietβ Output no headers for empty SELECT resultsets. nothing to see here, and it will not make you look at anything π€«--boolβ Set the exit code to1if at least one result row was found. yes queen, let the shell know if you found anything π--stringβ Output the (single) column that the query returns as a string without any headers. raw. unfiltered. just the string π--formatformatter β Use a different formatter for table output. Supported formatters are:tab- output results as tab delimited columnsText::Table- output results as ASCII tableText::Table::Any- output results as various formats
--forceβ Don't stop on errors. bold. risky. kind of unhinged but we respect it π--helpβ Show this message. (hi, that's this. you found it. welcome π)
heads up bestie: --force means it keeps going even when stuff errors out. that's the whole point, so don't be surprised when it does exactly that π
and that's the whole page, fr fr β¨ this was perl v5.42.2, dated 2026-07-20, and it lives under the name RUN-SQL(1) π ty for reading, mwah π«Ά
π¦ where this page comes from
- fedora 44: perl-DBIx-RunSQL 0.28-1.fc44 Β· GPL-1.0-or-later OR Artistic-1.0-Perl
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms