![]() ![]() Which means that if the store id is not equal to ELECTRONICS, then it will return a true or Boolean representation of truth is also sometimes considered as 1. Let us now consider an example where we will use the NOT EQUAL operator in the SELECT statement and try to retrieve the value which we get after comparing the store id column value with electronics using the NOT EQUAL operator. Suppose we want to retrieve only those records involving f_name, l_name, store_id, and mobile_number whose store_id is not equal to VEGETABLES. ![]() We will consider this table for the implementation of the NOT EQUAL operator in PL/ SQL. The output of the execution of the above query statement is as shown below, which shows the rows contained by the customers_details table. The contents of the table can be checked by using the following query statement. Given below are the examples of PL/SQL NOT EQUAL:Ĭonsider one table whose name is customers_details that stores the information about all the customers and their contact details. For example, using the above syntax, we can check the inequality of two objects. Any of the above-mentioned three syntaxes can be used for comparison. In the above syntax, A and B can be any objects that can be column values of a table, expressions of some values, or even the literal constant values we are trying to compare. The syntax for specifying the operator is given below: A B Suppose we have to compare values of A and B objects using NOT EQUAL operator, then we can write it as A B or A != B or A ~= B.ĪS PER OUR REQUIREMENT, the NOT EQUAL operator can be used anywhere inside the PL/ SQL query statement, such as WHERE clause, SELECT clause, etc. The objects whose values we are trying to compare should be placed at both the ends of the NOT EQUAL operator. The EQUAL operator returns true when the two objects are exactly the same in value or else returns false, while in the case of NOT EQUAL operator, it returns true when both the objects are not the same or not equal, and when they are same, it returns a false value. NOT EQUAL operator is just the negation of EQUAL operator and works in the exactly opposite manner than that of EQUAL TO operator. For example, the NOT EQUAL operator in PL/ SQL can be represented by using three different types of symbols, which are or != or ~=. The relational operators include EQUAL, NOT EQUAL, LESS THAN, GREATER THAN, LESS THAN OR EQUAL TO, GREATER THAN OR EQUAL TO, etc. The comparison operators include operators like IN, IS NULL, LIKE, BETWEEN, etc. There are various kinds of operators supported by PL/ SQL, which include Relational operators, Arithmetic operators, Logical operators, String operators, Comparison operators. Web development, programming languages, Software testing & others Operators in PL/ SQL and NOT EQUAL Introduction Start Your Free Software Development Course ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |