SQL | IIF Function | Learn a Shorthand for CASE
HTML-код
- Опубликовано: 17 май 2023
- SQL Tips - Do you sometimes get tired of writing the long CASE statements?
Do you ever wish to know a shorthand way to write the CASE function?
Well, yes, there are functions which which can be used as a shorthand for CASE.
One such function is the IIF function. Do you know any others?
Please make sure to comment below!!!
Book a private One-on-One 1 hour training session - SQL for Beginners
calendly.com/learn-knowstar/1...
How to install SQL Server for practice?
• How to install SQL Ser...
Check out the complete list of SQL Query Interview Questions -
• SQL Query Interview Qu...
Must Do Data Analytics Certifications -
Google Data Analytics Professional Certificate
imp.i384100.net/OR37oQ
Google Advanced Data Analytics Professional Certificate
imp.i384100.net/eK1WmQ
Best Data Science / Analytics / SQL courses
Learn SQL Basics for Data Science Specialization
imp.i384100.net/qnXYk5
Beginners to Python Programming
skillshare.eqcm.net/GjMakm
Data Science and Business Analytics with Python
skillshare.eqcm.net/JrM1Aq
IBM Data Science Professional Certificate
imp.i384100.net/LPQvg3
Data Science Fundamentals with Python and SQL Specialization
imp.i384100.net/mgVYre
Python for Everybody Specialization
imp.i384100.net/DVz7Aj
Google Data Analytics Professional Certificate
imp.i384100.net/OR37oQ
Coursera Plus - Data Science Career Skills
imp.i384100.net/c/3299742/132...
Please do not forget to like, subscribe and share.
For enrolling and enquiries, please contact us at
Website - knowstar.org/
Instagram - / learn.knowstar
Blog - know-star.blogspot.com/
Facebook - / knowstartrainings
Linkedin - www.linkedin.com/company/know...
Email - learn@knowstar.org
SQL Tips - Do you sometimes get tired of writing the long CASE statements?
Do you ever wish to know a shorthand way to write the CASE function?
Well, yes, there are functions which which can be used as a shorthand for CASE.
One such function is the IIF function. Do you know any others?
Please make sure to comment below!!!
Iif is very useful for single case statement, iff can also add or condition
Ex : iif( 5 > 3 or 5>4 , 5 is big, 5 is small ), similarly and operator
We use the decode function in plsql.
thankyou, would love for another simplified function...
Thank you
this is really awesome
Thank you
Or abs(Id-5)
What about performance
What will be the query if the manager colmn data in string? IIF will work for this too?
This Function will not work in azure Synapse..😢
Very nice!
Thanks!
good advice, not applicable for Oracle
Super
Thanks
Excellent 👌 and any stuff completely on advance sql? Please let us know
which version its supported?
SQL server 2016, 17, 19 will support as my per knowledge