-2

Assuming I have a table containing the following information:

ID Column A Column B Column C
1 A NULL NULL
1 NULL B NULL
1 NULL C NULL
1 NULL NULL D
1 NULL NULL E
1 NULL F NULL
2 NULL X NULL
2 NULL Y NULL
2 NULL NULL Z

is there a way I can perform a select on the table to get the following

ID Column A Column B Column C
1 A B D
1 NULL C E
1 NULL F NULL
2 NULL X Z
2 NULL Y NULL

1 Answers1

0

Assuming you want to get rows where column B is not null:

SELECT *
FROM yourTable t
WHERE t.ColumnB is not null
FFFffff
  • 776
  • 7
  • 18