Most of them. In particular those that return (as in SELECT) data work either way. Those that set things can only be used as a pragma.
Note that the table name is passed differently (in the case of pragma's expecting an identifier). It is an identifier in the case of a pragma statement, and a string in the case of the table valued function. pragma foreign_key_list(identifier); select * from pragma_foreign_key_list(stringval); ie: pragma foreign_key_list("My Table"); select * from foreign_key_list('My Table'); or, if you do not have stoopid characters in identifiers: pragma foreign_key_list(MyTable); select * from foreign_key_list('MyTable'); Both versions behave identically and reset/auto-reset properly for me ... --- The fact that there's a Highway to Hell but only a Stairway to Heaven says a lot about anticipated traffic volume. >-----Original Message----- >From: sqlite-users [mailto:sqlite-users- >boun...@mailinglists.sqlite.org] On Behalf Of Olivier Mascia >Sent: Tuesday, 5 June, 2018 15:35 >To: SQLite mailing list >Subject: Re: [sqlite] Reset the cursor > >> Le 5 juin 2018 à 22:47, Igor Korot <ikoro...@gmail.com> a écrit : >> >> As a side note: is it the case for all PRAGMA's command - they can >be >> rewritten this way? > >Full documentation for that is on page >https://www.sqlite.org/pragma.html, see the second title ("PRAGMA >functions"). > >Citing in short: // PRAGMAs that return results and that have no >side-effects can be accessed from ordinary SELECT statements as >table-valued functions. For each participating PRAGMA, the >corresponding table-valued function has the same name as the PRAGMA >with a 7-character "pragma_" prefix. // > >-- >Best Regards, Meilleures salutations, Met vriendelijke groeten, >Olivier Mascia > > >_______________________________________________ >sqlite-users mailing list >sqlite-users@mailinglists.sqlite.org >http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users _______________________________________________ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users