Example:
CREATE TABLE ErrorNumber
(
ErrorNumber int,
ErrorText varchar(255),
)
This can result in queries that look like:
SELECT ErrorNumber FROM ErrorNumber WHERE ErrorNumber=10
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
I’m assuming that ErrorNumber as a column in the table is a primary key? In this case you could name the table column ErrorNumberID.
I don’t know about it being a poor coding practice, but I can’t imagine it is doing anything for readability. The example you provided is great at showing how confusing the queries can end up being.
The other thing I’m not sure of is if this (column names being the same as table names) would cause an error? I’m sure it varies from vendor to vendor.