You have two options
INNER JOIN x
ON x.qid = y.qid OR (x.qid IS NULL AND y.qid IS NULL)
or easier
INNER JOIN x
ON x.qid IS NOT DISTINCT FROM y.qid
More Related Contents:
- How to display data in JOIN, and return null value? [closed]
- NULL values inside NOT IN clause
- SQL update from one Table to another based on a ID match
- Not equal != operator on NULL
- Why does NULL = NULL evaluate to false in SQL server
- Can I use CASE statement in a JOIN condition?
- Difference between JOIN and INNER JOIN
- Difference between left join and right join in SQL Server [duplicate]
- Implement paging (skip / take) functionality with this query
- Natural join in SQL Server
- Joining multiple tables in SQL
- Space used by nulls in database
- Removing duplicate rows (based on values from multiple columns) from SQL table
- Subquery using Exists 1 or Exists *
- How can I query a value in SQL Server XML column
- Most efficient T-SQL way to pad a varchar on the left to a certain length?
- SQL – How to store and navigate hierarchies?
- SQL Query to get aggregated result in comma separators along with group by column in SQL Server
- Update records in table from CTE
- Write a number with two decimal places SQL Server
- How to insert multiple records and get the identity value?
- How can a LEFT OUTER JOIN return more records than exist in the left table?
- Count Number of Consecutive Occurrence of values in Table
- Group DateTime into 5,15,30 and 60 minute intervals
- How to replace (null) values with 0 output in PIVOT
- Is there a SELECT … INTO OUTFILE equivalent in SQL Server Management Studio?
- SQL – Difference between COALESCE and ISNULL? [duplicate]
- Return rows in the exact order they were inserted
- Why is 30 the default length for VARCHAR when using CAST?
- Can’t create stored procedure with table output parameter