Im new here to StackOverflow and relatively new to IT, just learning the ropes of SQL. Please forgive me if I have posted this in the wrong location or asked a silly question.
Hoping to get some assistance with the following issue I am having:
I have an Oracle database (using Oracle SQL Developer to access it).
I am trying to execute a command and cannot seem to figure out how to extract from the database. I am trying to discover the number of departments in column (DEPTNAME) that contain the string 'computer' in their title.
I thought the following command would give me my answer, but it is just returning a value of 0:
select count(DEPTNAME)
from Department
where DEPTNAME LIKE '%comp%';
However when I use this command, I get a return of 41. This number isn't correct however.
select count(DEPTNAME)
from Department
where DEPTNAME LIKE '%c%';
I essentially just need to know the command for a the DBMS to find a random string and display the amount of times this string appears in the columns.
compwould also returncompetitive programminganddecompression. The two solutions offered both make this point.