-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
  • 96,171
  • 6
  • 121
  • 214

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
  • 5,077
  • 3
  • 27
  • 34
0
 SELECT ID_TRANSAKSI,ID_BARANG,JML
    FROM YOUR_TABLE WHERE ID_TRANSAKSI<>'TRX0613-021';
Sergey
  • 4,719
  • 1
  • 6
  • 11
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
  • 827
  • 7
  • 14