What is the difference between SQLite integer data types like int, integer, bigint, etc.?

From the SQLite3 documentation: http://www.sqlite.org/datatype3.html Most SQL database engines (every SQL database engine other than SQLite, as far as we know) uses static, rigid typing. With static typing, the datatype of a value is determined by its container – the particular column in which the value is stored. SQLite uses a more general dynamic type … Read more

Export from sqlite to csv using shell script

Instead of the dot commands, you could use sqlite3 command options: sqlite3 -header -csv my_db.db “select * from my_table;” > out.csv This makes it a one-liner. Also, you can run a sql script file: sqlite3 -header -csv my_db.db < my_script.sql > out.csv Use sqlite3 -help to see the list of available options.

How delete table inner join with other table in Sqlite?

Try to rewrite you query using subquery: In case your PK for TR_ContactResultRecord is CaseNo DELETE FROM TR_ContactResultRecord WHERE CaseNo IN ( SELECT CaseNo FROM TR_ContactResultRecord a INNER JOIN TR_Case b ON (a.FireStationCode=b.FireStationCode and a.CaseNo=b.CaseCode ) WHERE b.Update_DateTime <=20140628134416 );

Encrypted cookies in Chrome

I’ve run into this same problem, and the code below provides a working example for anyone who is interested. All credit to Scherling, as the DPAPI was spot on. public class ChromeCookieReader { public IEnumerable<Tuple<string,string>> ReadCookies(string hostName) { if (hostName == null) throw new ArgumentNullException(“hostName”); var dbPath = Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData) + @”\Google\Chrome\User Data\Default\Cookies”; if (!System.IO.File.Exists(dbPath)) throw … Read more

SQLite add Primary Key

You can’t modify SQLite tables in any significant way after they have been created. The accepted suggested solution is to create a new table with the correct requirements and copy your data into it, then drop the old table. here is the official documentation about this: http://sqlite.org/faq.html#q11

How to create custom functions in SQLite

SQLite does not have a stored function/stored procedure language. So CREATE FUNCTION does not work. What you can do though is map functions from a c library to SQL functions (user-defined functions). To do that, use SQLite’s C API (see: http://www.sqlite.org/c3ref/create_function.html) If you’re not using the C API, your wrapper API may define something that … Read more