Could you please list some of the bad practices in SQL, that novice people do?
I have found the use of "WHILE loop" in scenarios which could be resolved using set operations.
Another example is inserting data only if it does not exist. This can be achieved using LEFT OUTER JOIN. Some people go for "IF"
Any other thoughts?
Edit: What I am looking for is specific scenarios (as mentioned in the question) that could be achieved using SQL without using procedural constructs
Thanks
Lijo
In computer programming, a code smell is any characteristic in the source code of a program that possibly indicates a deeper problem. Determining what is and is not a code smell is subjective, and varies by language, developer, and development methodology.
Take a God object, separate its data and functions according to what problems they exist to solve, then turn those groupings into objects. If you have a God object, it may be better off as a composition of many smaller objects.
Code smell is a word which was popularized by Kent Beck on words wiki. It is any characteristic in programing source code that indicates a deeper problem in our code. Code smell is not a bug but it is a sign of bad construction of your program.
Here are some I have seen:
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With