Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- declare @table table
- (
- column1 uniqueidentifier default (newid()),
- column2 int,
- column3 datetime default (getdate())
- )
- declare @counter int
- set @counter = 1
- while @counter <= 10000
- begin
- insert into @table (column2) values (@counter)
- set @counter = @counter + 1
- end
- select * from @table
- select * from @table t1 join @table t2 on t1.column1 = t2.column1 and t1.column2 != t2.column2
Add Comment
Please, Sign In to add comment