I want to ask how to display all records except for TRX0613-021 Here's is my 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"
I want to ask how to display all records except for TRX0613-021 Here's is my 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"
You could use the SQL <>
("not equal to") operator, i.e.
SELECT *
FROM table_name
WHERE id_transaksi <> 'TRX0613-021'
SELECT ID_TRANSAKSI,ID_BARANG,JML
FROM YOUR_TABLE WHERE ID_TRANSAKSI<>'TRX0613-021';
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