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 trial

Development Tools

Kevin Naegele
Kevin Naegele
10,868 Points

naming columns in mysql

I am making a database and i have to have the colum names be exact, but they include "number" and the word "Date" "end"

2 Answers

Casey Ydenberg
Casey Ydenberg
15,622 Points

I believe those can be valid column names but they must be enclosed in backticks in your queries. ie

SELECT `date` FROM `table` WHERE `number` = 1

If you use backticks they will not be interpreted as MySQL literal.

Kevin Naegele
Kevin Naegele
10,868 Points

I can not use underscores "_" any thoughts