Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to export in phpmyadmin not include id column (the AUTO_INCREMENT column)

My database structure is:

`id` int(11) NOT NULL AUTO_INCREMENT,
`name` varchar(20) COLLATE utf8_unicode_ci NOT NULL,
`address` varchar(50) COLLATE utf8_unicode_ci NOT NULL,
`tel` varchar(20) COLLATE utf8_unicode_ci NOT NULL,
`longitude` int(6) NOT NULL,
`latitude` int(6) NOT NULL,
`type` varchar(1) COLLATE utf8_unicode_ci NOT NULL,
PRIMARY KEY (`id`)  

As I want to backup, but I don't want to include id when export to file (.sql)
How can I do?

like image 661
red23jordan Avatar asked Nov 15 '11 14:11

red23jordan


People also ask

How do I export a selected column in phpMyAdmin?

Show activity on this post. Show activity on this post. open the table from which you want to export only certain column , click on structure , tick mark on check box of that column , click on browse button ! after that it will show you your column data , below their is written export button click on it !

How do I export a selected column in MySQL?

You can do it very easily using MySQL GUI tools like SQLyog, PHPMyAdmin. In SQLyog you just need to select the table, Click on "Export As..." Icon and you will get dialog to select the columns that you want to Export. Then click on "Export Button".

What is auto increment in phpMyAdmin?

Auto Increment is a function that operates on numeric data types. It automatically generates sequential numeric values every time that a record is inserted into a table for a field defined as auto increment.


1 Answers

Go to SQL tab and manually write your select query without id column (SELECT name, address, ... FROM your_table). Then once you get the table with the results, scroll down to the bottom of the page and you'll see export icon inside the gray "Query results operations" fieldset. This should work for you.

Screenshot per request (see very bottom): enter image description here

like image 195
matino Avatar answered Sep 23 '22 06:09

matino