i just want to know that, there is any way through which i can Compare a column value with Some String value.Something like this...
suppose column name is SHIPMENT_EXPEDITE_HAWB
then can i have like this in plsql
SHIPMENT_EXPEDITE_HAWB=='PD'
Thaanks in advance!!!
The LIKE operator compares a character, string, or CLOB value to a pattern and returns TRUE if the value matches the pattern and FALSE if it does not. If 'Zara Ali' like 'Z% A_i' returns a Boolean true, whereas, 'Nuha Ali' like 'Z% A_i' returns a Boolean false.
In Oracle/PLSQL, you can use the = operator to test for equality in a query. For example: SELECT * FROM customers WHERE last_name = 'Anderson'; In this example, the SELECT statement above would return all rows from the customers table where the last_name is equal to Anderson.
A string function is a function that takes a string value as an input regardless of the data type of the returned value. In SQL Server, there are many built-in string functions that can be used by developers. We can compare strings by using the IF-ELSE statement.
You just need one equals, not two.
IF shipment_expedite_hawb = 'PD' THEN
dbms_output.put_line('Same');
END IF;
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With