I only do this routinely when the same data could be found in other tables, to make it clear that it is from another table. The most common example would be naming ID columns as [Table]Id instead of just Id. I have used just Id in the past as the ID column and regretted it.
I might also do this when the column name I want to use is a reserved word, either in SQL or the programming language. Sometimes I can find an alternative name, but other times it just makes sense to prefix the table name and move on.
Generally though, I try to stick to the shortest descriptive name I can come up with.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
I only do this routinely when the same data could be found in other tables, to make it clear that it is from another table. The most common example would be naming ID columns as
[Table]Id
instead of justId
. I have used justId
in the past as the ID column and regretted it.I might also do this when the column name I want to use is a reserved word, either in SQL or the programming language. Sometimes I can find an alternative name, but other times it just makes sense to prefix the table name and move on.
Generally though, I try to stick to the shortest descriptive name I can come up with.