Jump to content

phpMyAdmin


klasss
 Share

Recommended Posts

Viva,

alteras a tabela e adicionas uma coluna para chave primária.

no php myadmin não sei, mas na linha de comandos isto é facil:

ALTER TABLE NomeTabela ADD id INT PRIMARY KEY AUTO_INCREMENT;

tanto quanto sei, esta alteração vai popular os rows existentes na tua tabela com um id auto incrementado.

"Que inquieto desejo vos tortura, Seres elementares, força obscura? Em volta de que ideia gravitais?" >> Anthero de Quental

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Linuxando.com | ...

Link to comment
Share on other sites

Não sei se percebi a tua pergunta, mas o código que propus altera-ta a tabela, não as restantes da tua bd.

Se não queres arriscar, cria umabd semellhante e testa. 😁

"Que inquieto desejo vos tortura, Seres elementares, força obscura? Em volta de que ideia gravitais?" >> Anthero de Quental

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Linuxando.com | ...

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...

Important Information

By using this site you accept our Terms of Use and Privacy Policy. We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.