Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialRamesh Giri
99 Pointswhat is the answer i didnt understa the term id column is auto incrementing... please help me
what is id column is auto incrementing.
1 Answer
Steven Parker
231,261 Points"Auto-incrementing" means that the column will automatically get a value that is one more than the last value given to that column when a new record is created. So when you create a new record, you do not need to (and probably would not want to) give this column a value.
For example, let's say we have a simple table with columns ID and NAME, and the ID column is auto-incrementing. It has 2 records and we want to add a new record for "Bob". So we do this:
INSERT INTO simple_table (NAME) VALUES ('Bob');
SELECT * FROM simple_table;
And what we get back is like this:
ID NAME
1 Dave
2 Jane
3 Bob
So even without giving a value to ID, it was set for us with a value higher than the other records have.
Jason Anello
Courses Plus Student 94,610 PointsJason Anello
Courses Plus Student 94,610 PointsCan you link to the challenge this is from?