Cari Blog Ini

02 Februari 2012

SQL Server - Replicate

1. Create Table

-----start-----
Create Table DummyTable2
(
EmpId Int,
EmpName Varchar(100)
)
-----end-----


2. Insert Dummy Data

-----start-----
Insert Into DummyTable2 Values (4, Replicate ('d',10))
GO

Insert Into DummyTable2 Values (6, Replicate ('f',10))
GO

Insert Into DummyTable2 Values (1, Replicate ('a',10))
GO

Insert Into DummyTable2 Values (3, Replicate ('c',10))
GO
-----end-----








Source:
http://www.sql-server-performance.com/2004/index-data-structures/2/