Skip to content

Instantly share code, notes, and snippets.

@utgwkk
Created May 15, 2021
Embed
What would you like to do?
Quine in SQL (SQLite3)
with quine as (select 'with quine as (select %c%s%c as s) select printf(s, char(39), s, char(39)) from quine' as s) select printf(s, char(39), s, char(39)) from quine
@utgwkk
Copy link
Author

utgwkk commented May 15, 2021

% sqlite3 < quine.sql | tee out
with quine as (select 'with quine as (select %c%s%c as s) select printf(s, char(39), s, char(39)) from quine' as s) select printf(s, char(39), s, char(39)) from quine
% diff quine.sql out           
% 

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment