Reputation: 9054
Is it bad practice to have spaces in between words in SQL entries?
Food Table
id name descriptions
-- ----------- ------------
1 large pizza very large
or do you need underscores?
Upvotes: 0
Views: 147
Reputation: 73554
Spaces in the records aren't a concern at all. Quite the opposite. Adding underscores would only mean that the developer would have to replace them in code. (grumble)
Spaces in the column names can add extra overhead and grumbling for the developer accessing the data. (For example, in SQL Server, you need to enclose them in square brackets in sql statements.)
Upvotes: 0
Reputation: 28177
It makes no real difference. Maybe some more typing when entering queries in remembering to place block quotes around field names (i.e. [your long fieldname]
).
Upvotes: 0
Reputation: 100567
Data is data. Your RDBMS won't care about spaces in the values in its string/text/varchar columns.
Upvotes: 6