锘??xml version="1.0" encoding="utf-8" standalone="yes"?>亚洲四色影视在线观看,久久久久久免费,欧美日韩调教http://m.shnenglu.com/theorix/category/8114.htmltheorixzh-cnWed, 29 Oct 2008 06:48:11 GMTWed, 29 Oct 2008 06:48:11 GMT60SQL 鑰冭瘯鎬葷粨http://m.shnenglu.com/theorix/archive/2008/10/28/65310.html<font color="red">闆鐨勫ぉ絀? theorix )</font><font color="red">闆鐨勫ぉ絀? theorix )</font>Tue, 28 Oct 2008 05:18:00 GMThttp://m.shnenglu.com/theorix/archive/2008/10/28/65310.htmlhttp://m.shnenglu.com/theorix/comments/65310.htmlhttp://m.shnenglu.com/theorix/archive/2008/10/28/65310.html#Feedback0http://m.shnenglu.com/theorix/comments/commentRss/65310.htmlhttp://m.shnenglu.com/theorix/services/trackbacks/65310.html
1.鏁版嵁綾誨瀷錛歜inary image char text datetime smalldatetime decimal 
float real bigint money nchar 


2.USE bookshopdb 
CREATE TABLE Authors 
( AuthorID SMALLINT IDENTITY(101,1) NOT NULL, 
FirstName VARCHAR(30) NOT NULL DEFAULT 'unknown',
LastName VARCHAR(30) NOT NULL, 
YearBorn CHAR(4) NOT NULL DEFAULT ' N/A ', 
YearDied CHAR(4) NOT NULL DEFAULT ' N/A ', 
Description VARCHAR(200) NOT NULL DEFAULT 'N/A' ) 
CREATE TABLE BookAuthors 
( AuthorID SMALLINT NOT NULL, 
TitleID CHAR(8) NOT NULL ) 
CREATE TABLE BookCondition 
( ConditionID TINYINT NOT NULL, 
ConditionName CHAR(10) NOT NULL, 
Description VARCHAR(50) NOT NULL DEFAULT 'N/A' ) 


3.sp_rename錛宻p_changeobjectowner錛孉LTER TABLE 錛?/div>
CREATE TABLE doc_exa ( column_a INT) 
GO 
ALTER TABLE doc_exa ADD column_b VARCHAR(20) NULL 
GO 
EXEC sp_help doc_exa 
GO 
DROP TABLE doc_exa 
GO 
CREATE TABLE cnst_example 
( id INT NOT NULL, 
name VARCHAR(10) NOT NULL, 
salary MONEY NOT NULL 
CONSTRAINT salary_cap CHECK (salary < 100000) )
--- INSERT INTO cnst_example VALUES (2,'Mary Smith',75000) 
--- INSERT INTO cnst_example VALUES (3,'Pat Jones',105000)   
ALTER TABLE cnst_example NOCHECK CONSTRAINT salary_cap 
--- INSERT INTO cnst_example VALUES (3,'Pat Jones',105000) 


4.Private Temporary Tables (#)
Global Temporary Tables (##)

CREATE TABLE #TEMP002(EID INT) GO
INSERT INTO #TEMP002(EID) VALUES (3) GO
SELECT * FROM #TEMP002 GO
DROP TABLE #TEMP002 GO
CREATE TABLE ##TEMP001(EID INT) 
GO



5.CREATE TABLE Table1
( Col1 INT PRIMARY KEY, 
Col2 VARCHAR(30) ) 
CREATE TABLE Table1 
( Col1 INT, 
Col2 VARCHAR(30), 
CONSTRAINT table_pk PRIMARY KEY (Col1) ) 
ALTER TABLE Table1 
ADD CONSTRAINT table_pk PRIMARY KEY (Col1) 

6.UNIQUE Constraints 
If a column (or combination of columns) is not the primary key.  Multiple UNIQUE 

constraints can be defined on a table, whereas only one PRIMARY KEY constraint can be 

defined on a table. 
 If a column allows null values.  UNIQUE constraints can be defined for columns that 

allow null values, whereas PRIMARY KEY constraints can be defined only on columns that 

do not allow null values. 


7.

CREATE TABLE Authors 
( AuthorID SMALLINT IDENTITY(101,1) NOT NULL, 
FirstName VARCHAR(8) NOT NULL DEFAULT 'unknown')


8.
A foreign key is a column or combination of columns used to establish and enforce a 

link between the data in two tables. 

CREATE TABLE Table1 
( Col1 INT PRIMARY KEY, 
Col2 INT REFERENCES Employees(EmployeeID) ) 

CREATE TABLE Table1 
( Col1 INT PRIMARY KEY, 
Col2 INT, 
CONSTRAINT col2_fk FOREIGN KEY (Col2) 
REFERENCES Employees (EmployeeID) ) 
ALTER TABLE Table1 
ADD CONSTRAINT col2_fk FOREIGN KEY (Col2) 
REFERENCES Employees (EmployeeID) 

9.
CHECK Constraints 
CHECK constraints enforce domain integrity by limiting the values that are 

accepted by a column. 

CREATE TABLE Table1 
( Col1 INT PRIMARY KEY, 
Col2 INT CONSTRAINT limit_amount 
CHECK (Col2 BETWEEN 0 AND 1000), 
Col3 VARCHAR(30) ) 

CREATE TABLE Table1 
( Col1 INT PRIMARY KEY, 
Col2 INT, 
Col3 VARCHAR(30), CONSTRAINT limit_amount 
CHECK (Col2 BETWEEN 0 AND 1000) ) 

ALTER TABLE Table1 ADD CONSTRAINT limit_amount 
CHECK (Col2 BETWEEN 0 AND 1000) 

10.
SELECT select_list 
[INTO new_table_name] 
FROM table_list 
[WHERE search_conditions] 
[GROUP BY group_by_list] 
[HAVING search_conditions] 
[ORDER BY order_list [ASC | DESC] ]

The DISTINCT Keyword: eliminates duplicate rows from a result set. 
SELECT DISTINCT ShipCity, ShipRegion 
FROM Orders 
ORDER BY ShipCity 
The TOP n Keyword: specifies that the first n rows of the result set are to be 

returned. 
SELECT DISTINCT TOP 10 ShipCity, ShipRegion 
FROM Orders 
ORDER BY ShipCity 
The AS Keyword: You can improve the readability of a SELECT statement by giving a 

table an alias 
table_name AS table_alias  or table_name table_alias 
SELECT p.pub_id, p.pub_name 
FROM publishers AS p 
Types of Information in the Select List:
SELECT FirstName + ' ' + LastName AS "Employee Name",

IDENTITYCOL AS "Employee ID", HomePhone, Region 
FROM Northwind.dbo.Employees 
ORDER BY LastName, FirstName ASC 
11.
% Any string of zero or more characters.
_ Any single character.
[ ] Any single character within the specified range (for example, [a-f]) or the 

specified set (for example, [abcdef]).
[^] Any single character not within the specified range (for example, [^a-f]) or 

the specified set (for example, [^abcdef]).

SELECT ContactName 
FROM Customers 
WHERE ContactName LIKE 'M[^a]%'

12.
SELECT ContactName 
FROM dbo.Customers 
WHERE ContactName LIKE 'M[^a]%'
UNION ALL
SELECT ContactName 
FROM dbo.Customers 
WHERE ContactName LIKE 'M[a-d]%'

13.
SELECT FirstName, LastName 
INTO EmployeeNames 
FROM Employers

14.
SELECT OrdD1.OrderID AS OrderID, 
SUM(OrdD1.Quantity) AS "Units Sold", 
SUM(OrdD1.UnitPrice * OrdD1.Quantity) AS Revenue

FROM [Order Details] AS OrdD1 
WHERE OrdD1.OrderID in 
(SELECT DISTINCT OrdD2.OrderID 
FROM [Order Details] AS OrdD2 
WHERE OrdD2.UnitPrice > $100) 
GROUP BY OrdD1.OrderID 
HAVING SUM(OrdD1.Quantity) > 100 

15.
USE Pubs 
SELECT Pub_id, Type, Title_id, Price 
FROM Titles 
ORDER BY Pub_id DESC, Type, Price 

16.
Most joins can be categorized as inner joins or outer joins. Inner joins return rows 

only when there is at least one row from both tables that matches the join condition, 

eliminating the rows that do not match with a row from the other table. Outer joins, 

however, return all rows from at least one of the tables or views mentioned in the 

FROM clause as long as these rows meet any WHERE or HAVING search conditions. You can 

also create cross-joins and self-joins. 

17.
SELECT t.Title, p.Pub_name 
FROM Publishers AS p INNER JOIN Titles AS t 
ON p.Pub_id = t.Pub_id 
ORDER BY Title ASC 

18.
SELECT a.Au_fname, a.Au_lname, p.Pub_name 
FROM Authors a LEFT OUTER JOIN Publishers p 
ON a.City = p.City 
ORDER BY p.Pub_name ASC, a.Au_lname ASC, a.Au_fname ASC 

USE Pubs 
SELECT a.Au_fname, a.Au_lname, p.Pub_name 
FROM Authors a RIGHT OUTER JOIN Publishers p 
ON a.City = p.City 
ORDER BY p.Pub_name ASC, a.Au_lname ASC, a.Au_fname ASC 

USE Pubs 
SELECT a.Au_fname, a.Au_lname, p.Pub_name 
FROM Authors a FULL OUTER JOIN Publishers p 
ON a.City = p.City 
ORDER BY p.Pub_name ASC, a.Au_lname ASC, a.Au_fname ASC

USE Northwind 
SELECT ProductName 
FROM Products 
WHERE UnitPrice = ( 
SELECT UnitPrice 
FROM Products 
WHERE ProductName = 'Sir Rodney''s Scones' ) 

WHERE <expression> [NOT] IN (<subquery>) 
WHERE <expression> <comparison_operator> [ANY | ALL] (<subquery>) 
WHERE [NOT] EXISTS (<subquery>) 

USE Pubs 
SELECT Pub_name 
FROM Publishers 
WHERE Pub_id IN ( SELECT Pub_id FROM Titles WHERE Type = 'business'  )


USE Pubs 
SELECT Title 
FROM Titles WHERE Advance > ANY ( 
SELECT Advance 
FROM Publishers INNER JOIN Titles ON Titles.Pub_id = Publishers.Pub_id AND Pub_name = 

'Algodata Infosystems' )

USE Pubs 
SELECT Pub_name 
FROM Publishers 
WHERE EXISTS ( 
SELECT * 
FROM Titles 
WHERE Titles.Pub_id = Publishers.Pub_id AND 
Type = 'business' ) 

AVG(expression)
COUNT(expression)
COUNT(*)
MAX(expression)
MIN(expression)
SUM(expression)


19.
Using the CUBE Operator to Summarize Data 
The CUBE operator generates a result set that is a multi-dimensional cube. A 

multi-dimensional cube is an expansion of fact data, or data that records individual 

events. The expansion is based on columns that the user wants to analyze. These 

columns are called dimensions. The cube is a result set containing a cross-tabulation 

of all the possible combinations of the dimensions. 
The following SELECT statement uses the CUBE operator in the GROUP BY clause: 
USE Pubs 
SELECT SUBSTRING(Title, 1, 65) AS Title, SUM(qty) AS 'Quantity' 
FROM Sales INNER JOIN Titles 
ON Sales.Title_id = Titles.Title_id 
GROUP BY Title WITH CUBE 
ORDER BY Title 

20.

USE Pubs 
INSERT INTO NewBooks (BookTitle, BookType) 
SELECT Title, Type 
FROM Titles WHERE Type = 'mod_cook' 

CREATE DEFAULT bound_default AS 'Bound default value' 
GO 
CREATE TABLE T1 ( column_1 int identity, 
column_2 varchar(30) 
CONSTRAINT default_name DEFAULT ('column default'), column_3 

timestamp, 
column_4 varchar(30), 
column_5 int NULL) 
GO 
USE master 
EXEC sp_bindefault 'bound_default','T1.column_4' 
INSERT INTO T1 DEFAULT VALUES 
--   SELECT * FROM T1 

21.
UPDATE        
table_name or view_name      
SET        
column_name = { expression | DEFAULT | NULL }
FROM table_source        
WHERE search_condition 

USE Pubs 
UPDATE NewBooks 
SET Price = Price * 1.1 

USE Pubs 
UPDATE NewBooks 
SET Price = Titles.Price 
FROM NewBooks JOIN Titles 
ON NewBooks.BookTitle = Titles.Title 

USE Pubs 
UPDATE NewBooks 
SET BookType = 'popular' 
WHERE BookType = 'popular_comp‘

DELETE table_or_view 
FROM table_source 
WHERE search_condition 
Example:
USE Pubs 
DELETE NewBooks 
FROM Titles 
WHERE NewBooks.BookTitle = Titles.Title AND Titles.Royalty = 10 




闆鐨勫ぉ絀? theorix ) 2008-10-28 13:18 鍙戣〃璇勮
]]>
姊ㄨ姳棣?(姝岃瘝)http://m.shnenglu.com/theorix/archive/2008/09/01/60556.html<font color="red">闆鐨勫ぉ絀? theorix )</font><font color="red">闆鐨勫ぉ絀? theorix )</font>Sun, 31 Aug 2008 18:23:00 GMThttp://m.shnenglu.com/theorix/archive/2008/09/01/60556.htmlhttp://m.shnenglu.com/theorix/comments/60556.htmlhttp://m.shnenglu.com/theorix/archive/2008/09/01/60556.html#Feedback0http://m.shnenglu.com/theorix/comments/commentRss/60556.htmlhttp://m.shnenglu.com/theorix/services/trackbacks/60556.html姊ㄨ姳棣欐瓕璇?/span>

絎戠湅涓栭棿 鐥翠漢涓囧崈

鐧介鍚屽?瀹為毦寰楄

浜洪潰妗冭姳鏄皝鍦ㄦ壆婕?/font>

浜嬭繃澧冭縼 鏁呬漢闅捐

鏃ф棩榛勬槒 鏄犵収鏂伴

鐩告濅箣鑻﹁皝鍙堟暍鐩磋█

姊ㄨ姳棣?鍗磋浜哄績鎰熶激

鎰佹柇鑲?鍗冩澂閰掕В鎬濋噺

鑾浉鏈?鏃ф椂浜烘柊妯℃牱 鎬濆繕涔?/font>

浜嬭繃澧冭縼 鏁呬漢闅捐

鏃ф棩榛勬槒 鏄犵収鏂伴

鐩告濅箣鑻﹁皝鍙堟暍涔嬭█

涓烘儏浼?涓栭棿浜嬬殕鏃犲父

絎戞缽妗?涓囪娉寲瀵掔獥

鍕垮椒寰?鑴辯礌瑁圭潃鏄ヨ 蹇嗘祦鑺?/font>

絎戞垜澶繃鐥寸媯

鐩告濆鏈ぎ

鐙垜瀛よ姵鑷祻 孌嬮

姊ㄨ姳棣?鍗磋浜哄績鎰熶激

鎰佹柇鑲?鍗冩澂閰掕В鎬濋噺

鑾浉鏈?鏃ф椂浜烘柊妯℃牱 鎬濇湜涔?/font>

涓烘儏浼?涓栭棿浜嬬殕鏃犲父

絎戞缽妗?涓囪娉寲瀵掔獥

鍕垮椒寰?鑴辯礌瑁圭潃鏄ヨ 蹇嗘祦鑺?/font>

絎戞垜澶繃鐥寸媯



]]>
MY LOVE WILL GET YOU HOME http://m.shnenglu.com/theorix/archive/2008/08/31/60473.html<font color="red">闆鐨勫ぉ絀? theorix )</font><font color="red">闆鐨勫ぉ絀? theorix )</font>Sat, 30 Aug 2008 16:46:00 GMThttp://m.shnenglu.com/theorix/archive/2008/08/31/60473.htmlhttp://m.shnenglu.com/theorix/comments/60473.htmlhttp://m.shnenglu.com/theorix/archive/2008/08/31/60473.html#Feedback0http://m.shnenglu.com/theorix/comments/commentRss/60473.htmlhttp://m.shnenglu.com/theorix/services/trackbacks/60473.html闃呰鍏ㄦ枃

闆鐨勫ぉ絀? theorix ) 2008-08-31 00:46 鍙戣〃璇勮
]]>
九九99精品久久久久久| 国产福利电影一区二区三区久久老子无码午夜伦不 | 久久精品不卡| 亚洲国产成人久久精品99 | 久久久青草青青国产亚洲免观| 思思久久99热只有频精品66| 狠狠色婷婷久久一区二区三区| 精品久久久久一区二区三区| 99蜜桃臀久久久欧美精品网站| 国产精品久久久久无码av| 最新久久免费视频| 亚洲狠狠综合久久| 欧美丰满熟妇BBB久久久| 久久人人超碰精品CAOPOREN| 久久99热只有频精品8| 久久伊人五月天论坛| 久久亚洲国产午夜精品理论片| 久久人妻少妇嫩草AV蜜桃| 精品国产婷婷久久久| 久久综合九色综合精品| 国产69精品久久久久9999APGF| 久久91精品综合国产首页| 色综合久久天天综合| 精品无码久久久久久午夜| 一本久久a久久精品vr综合| 亚洲日韩欧美一区久久久久我| 激情五月综合综合久久69| 久久国产精品-国产精品| 亚洲精品乱码久久久久久中文字幕| 久久久久久A亚洲欧洲AV冫| 久久夜色精品国产噜噜噜亚洲AV| 污污内射久久一区二区欧美日韩| 91精品国产综合久久四虎久久无码一级 | 国产精品狼人久久久久影院 | 久久精品水蜜桃av综合天堂| 国产成人精品综合久久久久| 99久久香蕉国产线看观香| 99久久国产亚洲综合精品| 久久久精品久久久久影院| 亚洲精品国产第一综合99久久 | 日韩欧美亚洲综合久久影院Ds|