Jump to content
Fórum Script Brasil
  • 0

duvida com backup


aalessandre

Question

preciso gerar um backup do meu banco, gostaria de gerar um insert para cada registro da tabela, exemplo :

INSERT INTO tabela1 VALUES (1, 'Teste 1');

INSERT INTO tabela1 VALUES (2, 'Teste 2');

INSERT INTO tabela1 VALUES (3, 'Teste 3');

INSERT INTO tabela1 VALUES (4, 'Teste 4');

INSERT INTO tabela1 VALUES (5, 'Teste 5');

uso o mysqldump mas ele gera numa linha só :

insert into `bairro`(`bai_codigo`,`bai_cidade`,`bai_descricao`,`bai_tx_entrega`,`bai_vlr_entrega`) values (1,1,'CENTRO','0.00','0.00'),(1,2,'ZONA 1','0.00','0.00'),(1,3,'CAMPO CUMPRIDO','0.00','0.00'),(1,7,'FERRARIA','0.00','0.00'),(1,8,'PACOTUBA','0.00','0.00'),(1,9,'JARDIM IGUAÇU','0.00','0.00'),(1,10,'','0.00','0.00'),(1,11,'CENTRO','0.00','0.00'),(2,1,'SITIO CERCADO','0.00','0.00'),(2,3,'CIC','0.00','0.00'),(2,7,'CENTRO','0.00','0.00'),(3,1,'FAZENDINHA','0.00','0.00'),(3,3,'CAIOA','0.00','0.00'),(4,1,'CAMPO CUMPRIDO','0.00','0.00'),(4,3,'CAIUA','0.00','0.00'),(5,1,'PORTAO','0.00','0.00'),(5,3,'PAROLIN','0.00','0.00'),(6,1,'CIC','0.00','0.00'),(6,3,'CIDADE INDUSTRIAL','0.00','0.00'),(7,1,'CAJURU','0.00','0.00'),(7,3,'GUAÍRA','0.00','0.00'),(8,3,'ALTO BOQUEIRAO','0.00','0.00');

nesse caso, tenho 22 bairros, gostaria de gerar 22 inserts. como fazer isso ?

Link to comment
Share on other sites

0 answers to this question

Recommended Posts

There have been no answers to this question yet

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



  • Forum Statistics

    • Total Topics
      152.2k
    • Total Posts
      652k
×
×
  • Create New...