-3

I want to ask how to display all records except for TRX0613-021 Here's is my table

table

So I need to know how to do that for my assignment.

"Display data in the transaction details table whose transaction ID is not TRX0613-021"

ysth
  • 92,097
  • 6
  • 117
  • 207

3 Answers3

1

You could use the SQL <> ("not equal to") operator, i.e.

SELECT *
FROM table_name
WHERE id_transaksi <> 'TRX0613-021'
Alessio Cantarella
  • 4,800
  • 3
  • 26
  • 31
0
 SELECT ID_TRANSAKSI,ID_BARANG,JML
    FROM YOUR_TABLE WHERE ID_TRANSAKSI<>'TRX0613-021';
Sergey
  • 2,909
  • 1
  • 4
  • 8
0

You could use any of the following :

SELECT *
FROM table_name
WHERE id_transaksi <> 'TRX0613-021'

OR

SELECT *
FROM table_name
WHERE id_transaksi != 'TRX0613-021'

The queries return all the data in table except the row where id_transaksi is TRX0613-021

Please read more about using != and <> on this post

Rakhi Agrawal
  • 701
  • 6
  • 13