sql - Executing different queries depending on case statement -
I have a column called 'caller', which contains several values i when the value of this column is 'major' , Then I want to execute the following:
choose * from students *; And when there is something else, I want to execute:
Choose from students differently; I used the case statement in the past to return a value. How can they be made to return a complete query? Alternatively, how can this problem be addressed without any problem?
Any help is appreciated.
I was giving a try on this. Basically, it gives you all the results for the Major and then adds other results. Select students where the solution = 'Major' UNION's selection body * Where the students will get the solution & lt; & Gt; 'Major'
Comments
Post a Comment