萨尔法保护 发表于 2016-11-30 09:35:17

Android开发相关:快速了解SQLite

// Set the column headers to show in the toolsqlite>. headers on// select all rows from a tableselect * from table1;// count the number of rows in a tableselect count(*) from table1;// select a specific set of columnsselect col1, col2 from table1;// select distinct values in a columnselect distinct col1 from table1;// counting the distinct valusselect count(col1) from (select distinct col1 from table1);// group byselect count(*), col1 from table1 group by col1;// regular inner joinselect * from table1 t1, table2 t2 where t1.col1 = t2.col1;// left outer join// give me everything in t1 even though there are no rows in t2select * from table t1 left outer join table2 t2 on t1.col1 = t2.col1 where ....
页: [1]
查看完整版本: Android开发相关:快速了解SQLite