Skip to content

Concatenate and use in where clause oracle plsql

I have to concatenate two fields and use concatenated field in where clause but it gives me invalid identifier. How to solve this query. select i.FIRST_NAME || ‘ – ‘ || i.LAST_NAME as NAME, i.* from …

How to give comments in SQL

I am working in SQL. What is the complete explanation for using comments in SQL, with some example code? Answer MySQL Server supports three comment styles: From a # character to the end of the line. From a — sequence to the end of the line. In MySQL, the “– ” (double-dash) comment style requires t…

sqlite count of distinct occurrences

What is the best way of writing a sqlite query that will count the occurrences of colC after selecting distinct colA’s ? SELECT colA, colB, colC FROM myTable WHERE colA IN (‘121’, ‘122’,’123′,’124′,’…