Blackvelvet Posted May 23, 2012 at 05:08 PM Report #457693 Posted May 23, 2012 at 05:08 PM Boas, Como faço para que o id começe do inicio? Ou seja,devido aos testes realizados,na aplicação, eu quero apagar todos os registos da bd e que o id começe novamente do nº 1,uma vez que é autoincrement
Rechousa Posted May 23, 2012 at 05:12 PM Report #457694 Posted May 23, 2012 at 05:12 PM Olá, Podes fazê-lo através do comando DBCC CHECKIDENT, exemplo: DBCC CHECKIDENT('NOME_DA_TABELA', RESEED, 0); Mais info aqui: http://msdn.microsoft.com/en-us/library/ms176057.aspx Pedro Martins Sharing is Knowledge! http://www.linkedin.com/in/rechousa
Caça Posted May 23, 2012 at 11:02 PM Report #457745 Posted May 23, 2012 at 11:02 PM Ou faz um TRUNCATE Pedro Martins Não respondo a duvidas por PM
Blackvelvet Posted May 24, 2012 at 03:21 PM Author Report #457880 Posted May 24, 2012 at 03:21 PM Obrigado. Resolvido com o TRUNCATE.
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now