How to use  or != operator Here is my query: 

select     c._id, c.cat_name 
from       category c 
inner join deptcat dc 
on         c._id != dc.cat_id 
inner join department d 
on         dc.dept_id != d._id 
where      d._id = 1


I have 3 tables department, category and deptcat:

CREATE TABLE department
  (_id, dept_name)
AS
  VALUES
    ( 1, 'CSE' ),
    ( 2, 'E&amp;E' ) ;

CREATE TABLE category
  (_id, cat_name)
AS
  VALUES
    ( 1, 'a' ),
    ( 2, 'b' ),
    ( 3, 'c' ),
    ( 4, 'd' ) ;

CREATE TABLE deptcat
  (_id, dept_id, cat_id)
AS
  VALUES
    ( 1, 1, 1 ),
    ( 2, 1, 2 ) ;


My output should be like this:

_id | cat_name
----|-----------
3   | c
4   | d


I need to fetch the cat_id's which is not present in the deptcat table and also associated with dept_id  1, so can some one help me here?
You can use the exists condition to check for the existence of a record through a subquery. This is often preferable to an anti join (a left join where we make sure the right table is null) as the engine stops as soon as it finds a record.

Sample code:

select
    category._id,
    category.cat_name
from
    category
where
    not exists(
        select
            *
        from
            deptcat
            inner join department on(
                department._id = deptcat.dept_id
            )
        where
            deptcat.cat_id = category._id
            and department._id = 1
    )