So this is more of a theory question than practical but I'd appreciate any help. My friend and I are doing a project to learn new stuff and have fun. He's a coder and I like to think that I'm good with databases. Today an issue arose because he said that he thinks we shouldn't have repetitive queries just for different tables and had an idea of using ?
or some other symbol in my queries so he can replace it with appropriate word in code.
However, I don't agree, partly because I like having all of my queries in pure SQL and partly because I don't think that it's a good permanent solution. For an example what if a table gets new fields? The query is automatically not valid anymore.
Even if there are tables that are relatively similar and could use the same query is his idea a good practice or am I right about separating the queries?
Sorry if this is not the right place to post the question since it's not really a specific problem.