{"id":4017,"date":"2025-06-07T09:47:47","date_gmt":"2025-06-07T09:47:47","guid":{"rendered":"https:\/\/w3buddy.com\/?post_type=cposts&#038;p=4017"},"modified":"2025-06-07T09:47:48","modified_gmt":"2025-06-07T09:47:48","slug":"sql-operators-list","status":"publish","type":"cposts","link":"https:\/\/w3buddy.com\/blog\/notes\/sql\/sql-operators-list\/","title":{"rendered":"SQL Operators List"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">SQL operators are symbols or keywords used to perform operations on data, such as comparisons, arithmetic calculations, logical evaluations, and more. Knowing the common operators helps you write precise and efficient queries.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\ud83d\udd39 <strong>Categories of SQL Operators<\/strong><\/p>\n\n\n\n<figure class=\"wp-block-table has-small-font-size\"><table><thead><tr><th>Category<\/th><th>Operators<\/th><th>Purpose<\/th><\/tr><\/thead><tbody><tr><td><strong>Arithmetic<\/strong><\/td><td><code>+<\/code>, <code>-<\/code>, <code>*<\/code>, <code>\/<\/code>, <code>%<\/code><\/td><td>Basic math operations<\/td><\/tr><tr><td><strong>Comparison<\/strong><\/td><td><code>=<\/code>, <code>&lt;&gt;<\/code> or <code>!=<\/code>, <code>&lt;<\/code>, <code>&gt;<\/code>, <code>&lt;=<\/code>, <code>&gt;=<\/code><\/td><td>Compare values (equal, not equal, less, greater, etc.)<\/td><\/tr><tr><td><strong>Logical<\/strong><\/td><td><code>AND<\/code>, <code>OR<\/code>, <code>NOT<\/code><\/td><td>Combine or negate conditions<\/td><\/tr><tr><td><strong>String<\/strong><\/td><td><code>LIKE<\/code>, <code>NOT LIKE<\/code><\/td><td>Pattern matching with wildcards<\/td><\/tr><tr><td><strong>Set<\/strong><\/td><td><code>IN<\/code>, <code>NOT IN<\/code><\/td><td>Check for membership in a list\/set<\/td><\/tr><tr><td><strong>Null Check<\/strong><\/td><td><code>IS NULL<\/code>, <code>IS NOT NULL<\/code><\/td><td>Test for NULL values<\/td><\/tr><tr><td><strong>Bitwise<\/strong> (DBMS-specific)<\/td><td><code>&amp;<\/code>, `<\/td><td><code>, <\/code>^<code>, <\/code>~<code>, <\/code>&lt;&lt;<code>, <\/code>&gt;&gt;`<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">\ud83d\udd39 <strong>Common Operators Explained<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code><code>-- Arithmetic\nSELECT price, price * 0.10 AS tax FROM products;\n\n-- Comparison\nSELECT * FROM employees WHERE salary >= 50000;\n\n-- Logical\nSELECT * FROM orders WHERE status = 'Shipped' AND total > 100;\n\n-- String\nSELECT * FROM customers WHERE name LIKE 'A%';  -- names starting with A\n\n-- Set\nSELECT * FROM products WHERE category IN ('Electronics', 'Books');\n\n-- Null Check\nSELECT * FROM employees WHERE manager_id IS NULL;<\/code><\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">\ud83e\udde0 <strong>Quick Recap<\/strong><\/p>\n\n\n\n<figure class=\"wp-block-table has-small-font-size\"><table><thead><tr><th>Operator Type<\/th><th>Common Operators<\/th><th>Use Case<\/th><\/tr><\/thead><tbody><tr><td>Arithmetic<\/td><td><code>+<\/code>, <code>-<\/code>, <code>*<\/code>, <code>\/<\/code>, <code>%<\/code><\/td><td>Calculations<\/td><\/tr><tr><td>Comparison<\/td><td><code>=<\/code>, <code>&lt;&gt;<\/code>, <code>&lt;<\/code>, <code>&gt;<\/code>, <code>&lt;=<\/code>, <code>&gt;=<\/code><\/td><td>Filtering by condition<\/td><\/tr><tr><td>Logical<\/td><td><code>AND<\/code>, <code>OR<\/code>, <code>NOT<\/code><\/td><td>Combine multiple conditions<\/td><\/tr><tr><td>Pattern Matching<\/td><td><code>LIKE<\/code><\/td><td>Partial text matching<\/td><\/tr><tr><td>Set Membership<\/td><td><code>IN<\/code>, <code>NOT IN<\/code><\/td><td>Check against multiple values<\/td><\/tr><tr><td>Null Testing<\/td><td><code>IS NULL<\/code>, <code>IS NOT NULL<\/code><\/td><td>Find NULL or NOT NULL values<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">\ud83d\udca1 Operators are the building blocks of your query logic\u2014master them to write powerful SQL statements.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>SQL operators are symbols or keywords used to perform operations on data, such as comparisons, arithmetic calculations, logical evaluations, and more. Knowing the common operators helps you write precise and efficient queries. \ud83d\udd39 Categories of SQL Operators Category Operators Purpose Arithmetic +, -, *, \/, % Basic math operations Comparison =, &lt;&gt; or !=, &lt;, [&hellip;]<\/p>\n","protected":false},"template":"","meta":{"googlesitekit_rrm_CAowu461DA:productID":""},"categories":[952,979],"class_list":["post-4017","cposts","type-cposts","status-publish","hentry","category-notes","category-sql"],"_links":{"self":[{"href":"https:\/\/w3buddy.com\/blog\/wp-json\/wp\/v2\/cposts\/4017","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/w3buddy.com\/blog\/wp-json\/wp\/v2\/cposts"}],"about":[{"href":"https:\/\/w3buddy.com\/blog\/wp-json\/wp\/v2\/types\/cposts"}],"wp:attachment":[{"href":"https:\/\/w3buddy.com\/blog\/wp-json\/wp\/v2\/media?parent=4017"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/w3buddy.com\/blog\/wp-json\/wp\/v2\/categories?post=4017"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}