Difference between revisions of "sqlite3 notes"

From thelinuxwiki
Jump to: navigation, search
(Created page with " ==How to combine rows based on duplicate data in Sqlite== [http://stackoverflow.com/questions/32369323/android-how-to-combine-rows-based-on-duplicate-data-in-sqlite combin...")
 
Line 1: Line 1:
  
 
+
==basics==
 +
===attaching secondary databases===
 +
to insert, query, etc. between tables on different databases, attach multiple to your session
 +
sqlite> '''ATTACH DATABASE file_name AS database_name;
 +
'''
 +
list attached databases
 +
sqlite> '''.databases'''
 +
seq  name            file
 +
---  ---------------  ----------------------------------------------------------
 +
0    main            c:\sqlite\db\chinook.db
 +
2    contacts        c:\sqlite\db\contacts.db
  
 
==How to combine rows based on duplicate data in Sqlite==
 
==How to combine rows based on duplicate data in Sqlite==
  
 
[http://stackoverflow.com/questions/32369323/android-how-to-combine-rows-based-on-duplicate-data-in-sqlite combine rows android]
 
[http://stackoverflow.com/questions/32369323/android-how-to-combine-rows-based-on-duplicate-data-in-sqlite combine rows android]

Revision as of 18:16, 21 May 2019

basics

attaching secondary databases

to insert, query, etc. between tables on different databases, attach multiple to your session

sqlite> ATTACH DATABASE file_name AS database_name;

list attached databases

sqlite> .databases
seq  name             file
---  ---------------  ----------------------------------------------------------
0    main             c:\sqlite\db\chinook.db
2    contacts         c:\sqlite\db\contacts.db

How to combine rows based on duplicate data in Sqlite

combine rows android