目前分類:MSSQL (12)
- Feb 16 Tue 2016 18:09
SQL MERGE範例
- Dec 09 Wed 2015 11:29
SQL JOIN的觀念
- Sep 03 Thu 2015 17:59
SQL 觸發 RollBack
- Apr 23 Thu 2015 10:34
T-SQL WHILE
DECLARE @_i INT DECLARE @_MAX INT SET @_i = 0 SET @_MAX = 10 -- 要產生幾筆資料 WHILE (@_i<@_MAX) BEGIN --要迴圈的語法 INSERT INTO #TT VALUES('T') --加1 Set @_i=@_i+1 END
- Mar 25 Wed 2015 12:30
MySQL 超新手入門(3)SELECT 基礎查詢
http://www.codedata.com.tw/database/mysql-tutorial-basic-query
- Jul 21 Mon 2014 17:31
設定Primary Key為非叢集索引
-- Case 2 Primary Key Non-clustered Index
USE TempDB
GO
-- Create table
CREATE TABLE TestTable
(ID INT NOT NULL PRIMARY KEY NONCLUSTERED,
Col1 INT NOT NULL)
GO
-- Check Indexes
SELECT OBJECT_NAME(OBJECT_ID) TableObject,
[name] IndexName,
[Type_Desc]
FROM sys.indexes
WHERE OBJECT_NAME(OBJECT_ID) = 'TestTable'
GO
-- Clean up
DROP TABLE TestTable
GO
- Jul 17 Thu 2014 13:38
SQL Server 2008 Expess 版不支援 SQL Server Agent
http://alexchuo.blogspot.tw/2010/09/sql-server-2008-expess-sql-server-agent.html
- May 19 Mon 2014 17:54
避免SQL衝突 (兩人修改同一筆資料)
- Apr 23 Wed 2014 17:31
@@ROWCOUNT 異動筆數
- Apr 23 Wed 2014 12:10
排序函數:ROW_NUMBER()
- Apr 22 Tue 2014 18:14
INSERT、UPDATE FROM SELECT
- Apr 21 Mon 2014 15:26
PIVOT 資料表轉向