PHP Questions Home | Register | Login
Categories
Arrays
Files
Forms
Creating PDFs
PHP Errors
Functions
Images
MySQL
Numbers
Others
Strings
Website
Unanswered

PHP Forums
Forums Index
MySQL Forum
PHP Forum
Flash/Actionscript
Javascript
Web design

More PHP
PHP Functions
Top Questions
Ask a Question
PHP Interview Questions
PHP Jobs
Ecommerce
IT Questions
Business Websites

Sponsors

sponsor ad
My Salary
PHP Developer Salary
Advertise Here

PHP Questions Forums : mySQL Questions and Answers

Jump to Last Post

Do you need an id field on a table

By: Timjohns [26-January-10 8:54AM]
25 posts
picture

Most tables that I have worked with in mySQL have an id field (or similary named) at the start which autoincrements with each post.

Although this is not necessary I wondered how common it is?

I have got into the habit of pretty much basically, no matter what db table I create, having an auto-increment id field at the start of the table... do other people do this or is it just me?

Re : Do you need an id field on a table


Petetimms [27-January-10 5:16PM]
11 posts
picture

No you don't have to have an autoincrement field when working with a database table, but it can certainly be a useful thing to have and you will find this with many tables.

Next: Explanation Of The Different Types Of Join In MySQL



Custom Search