上一页 1 ··· 60 61 62 63 64 65 66 67 68 ··· 74 下一页
  2013年9月18日
摘要: 一.使用流程要使用sqlite,需要从sqlite官网下载到三个文件,分别为sqlite3.lib,sqlite3.dll,sqlite3.h,然后再在自己的工程中配置好头文件和库文件,同时将dll文件放到当前目录下,就完成配置可以使用sqlite了。使用的过程根据使用的函数大致分为如下几个过程:sqlite3_open()sqlite3_prepare()sqlite3_step()sqlite3_column()sqlite3_finalize()sqlite3_close()这几个过程是概念上的说法,而不完全是程序运行的过程,如sqlite3_column()表示的是对查询获得一行里面的 阅读全文
posted @ 2013-09-18 10:09 莫水千流 阅读(477) 评论(0) 推荐(0) 编辑
摘要: SQL INTERSECT is query that allows you to select related information from 2 tables, this is combine 2 SELECT statement into 1 and display it out.INTERSECT produces rows that appear in both queries.that means INTERSECT command acts as an AND operator (value is selected only if it appears in both stat 阅读全文
posted @ 2013-09-18 09:04 莫水千流 阅读(804) 评论(0) 推荐(0) 编辑
摘要: QL UNION is query that allows you to select related information from 2 tables, this is combine 2 SELECT statement into 1 and display it out.UNION will only return DISTINCT value only. Which means will eliminate duplicate records that returned.There are some condition that need to meet when using the 阅读全文
posted @ 2013-09-18 09:03 莫水千流 阅读(190) 评论(0) 推荐(0) 编辑
摘要: QL UNION ALL is query that allows you to select related information from 2 tables, the result is different from the UNION statement. It return all the record from SELECT statement that used.UNION ALL selects all rows from each table and combines them into a single table.The syntax is as follows:SELE 阅读全文
posted @ 2013-09-18 09:03 莫水千流 阅读(222) 评论(0) 推荐(0) 编辑
摘要: The SELECT INTO statement is usually used to create backup copies of tables. That also explain that SELECT INTO creates a new table and fills it with data computed by a query.SELECT INTO syntax is:SELECT [COLUMN NAME 1], [COLUMN NAME 2] ,... INTO [BACKUP TABLE NAME] FROM[TABLE NAME] EXAMPLE 1 ... 阅读全文
posted @ 2013-09-18 09:02 莫水千流 阅读(247) 评论(0) 推荐(0) 编辑
摘要: A JOIN command is queries that combine data from more than 1 table.For two tables that want to join together need to have some data in common, like unique id that link this 2 tables together. Normal join will need a joining condition or connecting column to display out the joined data. 1 joining con 阅读全文
posted @ 2013-09-18 09:00 莫水千流 阅读(246) 评论(0) 推荐(0) 编辑
摘要: A INNER JOIN command is queries that combine data from more than 1 table.For two tables that want to join together need to have some data in common, like unique id that link this 2 tables together. INNER JOIN will need a joining condition or connecting column to display out the joined data. 1 joinin 阅读全文
posted @ 2013-09-18 09:00 莫水千流 阅读(459) 评论(1) 推荐(0) 编辑
摘要: When we want to select out all the record from two table, no matter it's present at second table or not, we will have to use SQL OUTER JOIN command.There are 3 type of OUTER JOIN, which is: LEFT OUTER JOIN RIGHT OUTER JOIN FULL OUTER JOINSQL OUTER JOIN syntax:SELECT * FROM [TABLE 1] OUTE... 阅读全文
posted @ 2013-09-18 08:55 莫水千流 阅读(1311) 评论(1) 推荐(0) 编辑
摘要: 最近在讲到T-SQL查询的Join部分时,一下子没有想起来CROSS JOIN的用法,因为其实平常也确实基本不用到。特意找了一个例子,以供参考CROSS JOIN又称为笛卡尔乘积,实际上是把两个表乘起来。以下资料摘自:http://www.sqlguides.com/sql_cross_join.phpSQL CROSS JOIN will return all records where each row from the first table is combined with each row from the second table. Which also mean CROSS JO 阅读全文
posted @ 2013-09-18 08:53 莫水千流 阅读(1028) 评论(0) 推荐(0) 编辑
摘要: 一、基本的SELECT语句 1. “*”的注意事项:在SELECT语句中,用*来选取所有的列,这是一个应该抵制的习惯。 虽然节省了输入列名的时间,但是也意味着获得的数据比真正需要的数据多的多。相应的,也会降低应用程序的性能及网络性能。 良好的规则是只选所需。 2. join子句 join是用来定义如何从多个表中选取数据并组合成一个结果集。 join必需是因为(1)我们所要获取的所有信息并不都在一个表中,或者(2)所要返回的信息都在一个表中,但是其上设置的条件信息却在另一个表中。 join的共同点是通过记录的连接列,把一条记录同一条或者多条其他记录进行匹配,从而产生出是这些记录的超级的记... 阅读全文
posted @ 2013-09-18 08:48 莫水千流 阅读(1180) 评论(0) 推荐(0) 编辑
上一页 1 ··· 60 61 62 63 64 65 66 67 68 ··· 74 下一页