Skip to content
Advertisement

how to create new Columns by using if

I have a view called termdate: (termid,startingdate,endingdate,pre_edning) looks like:

I wish to create 2 new Columns called new_starting, new_ending by follow the rules below:

I’am new to sql, Can someone please help me to achive that?

Advertisement

Answer

If I understand correctly, this is just case expressions:

User contributions licensed under: CC BY-SA
9 People found this is helpful
Advertisement