Created
November 8, 2011 17:46
-
-
Save waldyrfelix/1348509 to your computer and use it in GitHub Desktop.
Preenchimento das tabelas para teste
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- inserindo categorias | |
insert into categoria (nome) values ('categoria ') | |
go 2000 | |
-- inserindo produtos até demais... | |
declare @i int = 0 | |
while @i < 100000 | |
begin | |
insert into produto (nome, preco, categoria_id) | |
values ('produto '+ CONVERT(varchar, @i), @i + 23.2, (@i % 1000) + 1) | |
set @i = @i + 1 | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment