摘要:
The HAVING clause is used in combination with the GROUP BY clause and the SQL aggregate functions. HAVING clause allows us to call the data conditionally on the column that return from using the SQL aggregate functions.The SQL HAVING syntax is simple and looks like this:SELECT [COLUMN NAME 1] , AGG. 阅读全文
posted @ 2013-09-18 14:10
莫水千流
阅读(346)
评论(0)
推荐(0)
摘要:
After being learn through all the displaying data syntax. It’s time to learn how to sort data by using ORDER BY.Yes it is. ORDER BY clause allows you to sort the records in your result set. This clause can only be used in SELECT statements. The ORDER BY clause sorts the result set based on the colum 阅读全文
posted @ 2013-09-18 14:08
莫水千流
阅读(739)
评论(0)
推荐(0)
摘要:
n relational database, Index will be the important mechanism for boosting performance. Index is important like Index for a book that helps you quickly find the pages that you wanted to read, index on the column speeds data retrieval.CREATE INDEX Statement will look like this:CREATE [UNIQUE] INDEX [I 阅读全文
posted @ 2013-09-18 14:00
莫水千流
阅读(278)
评论(0)
推荐(0)
摘要:
There are two types of aliases that are used most frequently in SQL command: which is column alias and table alias.Why ALIAS? There is some reasons alias to be use when querying a SQL command.- alias in a long query can make your query easier to read and understand- alias table is use when using a s 阅读全文
posted @ 2013-09-18 13:59
莫水千流
阅读(502)
评论(0)
推荐(0)
摘要:
here are some additional clause in the SQL language that can be used to simplify queries by decrease the use of the single Operator repeatly. One of them is IN clause.IN clause is used to simplify the queries if you want to select data that meet a large number of options. That means IN function help 阅读全文
posted @ 2013-09-18 13:58
莫水千流
阅读(818)
评论(0)
推荐(0)
摘要:
一.使用流程要使用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
莫水千流
阅读(581)
评论(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
莫水千流
阅读(817)
评论(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
莫水千流
阅读(196)
评论(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
莫水千流
阅读(227)
评论(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
莫水千流
阅读(250)
评论(0)
推荐(0)