If you want more data just add to cross joins more sys tables.
Be careful since row count grows exponentially.
CREATE TABLE Department (
DepartmentID int primary key not null identity,
[Name] nvarchar(4000)
)
CREATE TABLE Employee (
EmployeeID int primary key not null identity,
DepartmentID int,
constraint fk_employee_department foreign key (departmentid) references department(departmentid),
[Name] nvarchar(4000)
)
--Creating roughly 100000 dummy rows
INSERT INTO Department (Name)
SELECT
sys.objects.[Name]
FROM
sys.objects, sys.indexes, sys.tables
--Creating roughly 600000 dummy rows
INSERT INTO Employee (
DepartmentID, [Name]
)
SELECT
ASCII(LEFT(newid(),1)) AS DepartmentID,
sys.columns.[Name]
FROM
sys.objects, sys.columns, sys.tables
No comments:
Post a Comment