{"id":326,"date":"2018-04-30T21:17:55","date_gmt":"2018-04-30T14:17:55","guid":{"rendered":"http:\/\/www.sqlservertutorial.net\/?page_id=326"},"modified":"2024-03-02T15:39:55","modified_gmt":"2024-03-02T08:39:55","slug":"sql-server-or","status":"publish","type":"page","link":"https:\/\/www.sqlservertutorial.net\/sql-server-basics\/sql-server-or\/","title":{"rendered":"SQL Server OR Operator"},"content":{"rendered":"\n<p><strong>Summary<\/strong>: in this tutorial, you will learn how to use the SQL Server <code>OR<\/code> operator to combine two Boolean expressions.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id='introduction-to-sql-server-or-operator'>Introduction to SQL Server OR operator <a href=\"#introduction-to-sql-server-or-operator\" class=\"anchor\" id=\"introduction-to-sql-server-or-operator\" title=\"Anchor for Introduction to SQL Server OR operator\">#<\/a><\/h2>\n\n\n\n<p>The SQL Server <code>OR<\/code> is a logical operator that allows you to combine two Boolean expressions. It returns <code>TRUE<\/code> when either of the conditions evaluates to <code>TRUE<\/code>.<\/p>\n\n\n\n<p>The following shows the syntax of the <code>OR<\/code> operator:<\/p>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-1\" data-shcb-language-name=\"SQL (Structured Query Language)\" data-shcb-language-slug=\"sql\"><span><code class=\"hljs language-sql\">boolean_expression OR boolean_expression<\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-1\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">SQL (Structured Query Language)<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">sql<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n\n<p>In this syntax, the <code>boolean_expression<\/code> is any valid Boolean expression that evaluates to true, false, and unknown.<\/p>\n\n\n\n<p>The following table shows the results of the <code>OR<\/code> operator when you combine <code>TRUE<\/code>, <code>FALSE<\/code>, and <code>UNKNOWN<\/code>:<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table><thead><tr><th><\/th><th>TRUE<\/th><th>FALSE<\/th><th>UNKNOWN<\/th><\/tr><\/thead><tbody><tr><td><strong>TRUE<\/strong><\/td><td>TRUE<\/td><td>TRUE<\/td><td>TRUE<\/td><\/tr><tr><td><strong>FALSE<\/strong><\/td><td>TRUE<\/td><td>FALSE<\/td><td>UNKNOWN<\/td><\/tr><tr><td><strong>UNKNOWN<\/strong><\/td><td>TRUE<\/td><td>UNKNOWN<\/td><td>UNKNOWN<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p>When you use multiple logical operators in an expression, SQL Server always evaluates the <code>OR<\/code> operators after <code><a href=\"https:\/\/www.sqlservertutorial.net\/sql-server-basics\/sql-server-and\/\">AND<\/a><\/code> operators. But you can use the parentheses <code>()<\/code> to change the order of the evaluation.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id='sql-server-or-operator-examples'>SQL Server OR operator examples <a href=\"#sql-server-or-operator-examples\" class=\"anchor\" id=\"sql-server-or-operator-examples\" title=\"Anchor for SQL Server OR operator examples\">#<\/a><\/h2>\n\n\n\n<p>We&#8217;ll use the following <code>production.roducts<\/code> table from the <a href=\"https:\/\/www.sqlservertutorial.net\/sql-server-sample-database\/\">sample database<\/a>.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"206\" height=\"169\" src=\"https:\/\/www.sqlservertutorial.net\/wp-content\/uploads\/products.png\" alt=\"\" class=\"wp-image-147\"\/><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\" id='1-basic-sql-server-or-operator-example'>1) Basic SQL Server OR operator example <a href=\"#1-basic-sql-server-or-operator-example\" class=\"anchor\" id=\"1-basic-sql-server-or-operator-example\" title=\"Anchor for 1) Basic SQL Server OR operator example\">#<\/a><\/h3>\n\n\n\n<p>The following example uses the OR operator to find the products whose list price is less than 200 or greater than 6,000:<\/p>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-2\" data-shcb-language-name=\"SQL (Structured Query Language)\" data-shcb-language-slug=\"sql\"><span><code class=\"hljs language-sql\"><span class=\"hljs-keyword\">SELECT<\/span>\n    product_name,\n    list_price\n<span class=\"hljs-keyword\">FROM<\/span>\n    production.products\n<span class=\"hljs-keyword\">WHERE<\/span>\n    list_price &lt; <span class=\"hljs-number\">200<\/span>\n<span class=\"hljs-keyword\">OR<\/span> list_price &gt; <span class=\"hljs-number\">6000<\/span>\n<span class=\"hljs-keyword\">ORDER<\/span> <span class=\"hljs-keyword\">BY<\/span>\n    list_price;\n<\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-2\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">SQL (Structured Query Language)<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">sql<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"291\" height=\"299\" src=\"https:\/\/www.sqlservertutorial.net\/wp-content\/uploads\/SQL-Server-OR-example.png\" alt=\"SQL Server OR example\" class=\"wp-image-330\"\/><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\" id='2-using-multiple-or-operators'>2) Using multiple OR operators <a href=\"#2-using-multiple-or-operators\" class=\"anchor\" id=\"2-using-multiple-or-operators\" title=\"Anchor for 2) Using multiple OR operators\">#<\/a><\/h3>\n\n\n\n<p>The following statement uses multiple OR operators to find the products whose brand id is 1, 2, or 4:<\/p>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-3\" data-shcb-language-name=\"SQL (Structured Query Language)\" data-shcb-language-slug=\"sql\"><span><code class=\"hljs language-sql\"><span class=\"hljs-keyword\">SELECT<\/span>\n    product_name,\n    brand_id\n<span class=\"hljs-keyword\">FROM<\/span>\n    production.products\n<span class=\"hljs-keyword\">WHERE<\/span>\n    brand_id = <span class=\"hljs-number\">1<\/span>\n<span class=\"hljs-keyword\">OR<\/span> brand_id = <span class=\"hljs-number\">2<\/span>\n<span class=\"hljs-keyword\">OR<\/span> brand_id = <span class=\"hljs-number\">4<\/span>\n<span class=\"hljs-keyword\">ORDER<\/span> <span class=\"hljs-keyword\">BY<\/span>\n    brand_id <span class=\"hljs-keyword\">DESC<\/span>;\n<\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-3\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">SQL (Structured Query Language)<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">sql<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"333\" height=\"298\" src=\"https:\/\/www.sqlservertutorial.net\/wp-content\/uploads\/SQL-Server-OR-multiple-operators-example.png\" alt=\"\" class=\"wp-image-331\" srcset=\"https:\/\/www.sqlservertutorial.net\/wp-content\/uploads\/SQL-Server-OR-multiple-operators-example.png 333w, https:\/\/www.sqlservertutorial.net\/wp-content\/uploads\/SQL-Server-OR-multiple-operators-example-300x268.png 300w\" sizes=\"auto, (max-width: 333px) 100vw, 333px\" \/><\/figure>\n\n\n\n<p>You can replace multiple <code><a href=\"https:\/\/www.sqlservertutorial.net\/sql-server-basics\/sql-server-or\/\">OR<\/a><\/code> operators by the <code><a href=\"https:\/\/www.sqlservertutorial.net\/sql-server-basics\/sql-server-in\/\">IN<\/a><\/code> operator as shown in the following query:<\/p>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-4\" data-shcb-language-name=\"SQL (Structured Query Language)\" data-shcb-language-slug=\"sql\"><span><code class=\"hljs language-sql\"><span class=\"hljs-keyword\">SELECT<\/span>\n    product_name,\n    brand_id\n<span class=\"hljs-keyword\">FROM<\/span>\n    production.products\n<span class=\"hljs-keyword\">WHERE<\/span>\n    brand_id <span class=\"hljs-keyword\">IN<\/span> (<span class=\"hljs-number\">1<\/span>, <span class=\"hljs-number\">2<\/span>, <span class=\"hljs-number\">3<\/span>)\n<span class=\"hljs-keyword\">ORDER<\/span> <span class=\"hljs-keyword\">BY<\/span>\n    brand_id <span class=\"hljs-keyword\">DESC<\/span>;\n<\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-4\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">SQL (Structured Query Language)<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">sql<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n\n<h3 class=\"wp-block-heading\" id='3-combining-the-or-operator-with-the-and-operator'>3) Combining the OR operator with the AND operator <a href=\"#3-combining-the-or-operator-with-the-and-operator\" class=\"anchor\" id=\"3-combining-the-or-operator-with-the-and-operator\" title=\"Anchor for 3) Combining the OR operator with the AND operator\">#<\/a><\/h3>\n\n\n\n<p>The following example shows how to combine the <code>OR<\/code> operator with the <code>AND<\/code> operator within the same expression:<\/p>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-5\" data-shcb-language-name=\"SQL (Structured Query Language)\" data-shcb-language-slug=\"sql\"><span><code class=\"hljs language-sql\"><span class=\"hljs-keyword\">SELECT<\/span> \n    product_name, \n    brand_id, \n    list_price\n<span class=\"hljs-keyword\">FROM<\/span> \n    production.products\n<span class=\"hljs-keyword\">WHERE<\/span> \n    brand_id = <span class=\"hljs-number\">1<\/span>\n      <span class=\"hljs-keyword\">OR<\/span> brand_id = <span class=\"hljs-number\">2<\/span>\n      <span class=\"hljs-keyword\">AND<\/span> list_price &gt; <span class=\"hljs-number\">500<\/span>\n<span class=\"hljs-keyword\">ORDER<\/span> <span class=\"hljs-keyword\">BY<\/span> \n    brand_id <span class=\"hljs-keyword\">DESC<\/span>, \n    list_price;<\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-5\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">SQL (Structured Query Language)<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">sql<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"339\" height=\"322\" src=\"https:\/\/www.sqlservertutorial.net\/wp-content\/uploads\/SQL-Server-OR-with-AND-operator.png\" alt=\"SQL Server OR with AND operator\" class=\"wp-image-2164\" srcset=\"https:\/\/www.sqlservertutorial.net\/wp-content\/uploads\/SQL-Server-OR-with-AND-operator.png 339w, https:\/\/www.sqlservertutorial.net\/wp-content\/uploads\/SQL-Server-OR-with-AND-operator-300x285.png 300w\" sizes=\"auto, (max-width: 339px) 100vw, 339px\" \/><\/figure>\n\n\n\n<p>In this example, we used both <code>OR<\/code> and <code>AND<\/code> operators. As always, SQL Server evaluated the <code>AND<\/code> operator first. Therefore, the query returned the products whose brand id is 2 and the list price is greater than 500 or those whose brand id is 1.<\/p>\n\n\n\n<p>To find the products whose brand id is 1 or 2 and list price is greater than 500, you use the parentheses as shown in the following query:<\/p>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-6\" data-shcb-language-name=\"SQL (Structured Query Language)\" data-shcb-language-slug=\"sql\"><span><code class=\"hljs language-sql\"><span class=\"hljs-keyword\">SELECT<\/span>\n    product_name,\n    brand_id,\n    list_price\n<span class=\"hljs-keyword\">FROM<\/span>\n    production.products\n<span class=\"hljs-keyword\">WHERE<\/span>\n    (brand_id = <span class=\"hljs-number\">1<\/span> <span class=\"hljs-keyword\">OR<\/span> brand_id = <span class=\"hljs-number\">2<\/span>)\n     <span class=\"hljs-keyword\">AND<\/span> list_price &gt; <span class=\"hljs-number\">500<\/span>\n<span class=\"hljs-keyword\">ORDER<\/span> <span class=\"hljs-keyword\">BY<\/span>\n    brand_id;<\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-6\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">SQL (Structured Query Language)<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">sql<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"380\" height=\"305\" src=\"https:\/\/www.sqlservertutorial.net\/wp-content\/uploads\/SQL-Server-OR-with-AND-operator-precedence.png\" alt=\"\" class=\"wp-image-2165\" srcset=\"https:\/\/www.sqlservertutorial.net\/wp-content\/uploads\/SQL-Server-OR-with-AND-operator-precedence.png 380w, https:\/\/www.sqlservertutorial.net\/wp-content\/uploads\/SQL-Server-OR-with-AND-operator-precedence-300x241.png 300w\" sizes=\"auto, (max-width: 380px) 100vw, 380px\" \/><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\" id='summary'>Summary <a href=\"#summary\" class=\"anchor\" id=\"summary\" title=\"Anchor for Summary\">#<\/a><\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Use the SQL Server <code>OR<\/code> operator to combine two Boolean expressions.<\/li>\n\n\n\n<li>The <code>OR<\/code> operator returns <code>TRUE<\/code> if one of the expressions is <code>TRUE<\/code>.<\/li>\n\n\n\n<li>By default, SQL Server evaluates the <code>OR<\/code> operators after the <code>AND<\/code> operators within the same expression. But you can use parentheses <code>()<\/code> to change the order of evaluation.<\/li>\n<\/ul>\n<div class=\"helpful-block-content\" data-title=\"\">\n\t<header>\n\t\t<div class=\"wth-question\">Was this tutorial helpful?<\/div>\n\t\t<div class=\"wth-thumbs\">\n\t\t\t<button\n\t\t\t\tdata-post=\"326\"\n\t\t\t\tdata-post-url=\"https:\/\/www.sqlservertutorial.net\/sql-server-basics\/sql-server-or\/\"\n\t\t\t\tdata-post-title=\"SQL Server OR Operator\"\n\t\t\t\tdata-response=\"1\"\n\t\t\t\tclass=\"wth-btn-rounded wth-yes-btn\"\n\t\t\t>\n\t\t\t\t<svg\n\t\t\t\t\txmlns=\"http:\/\/www.w3.org\/2000\/svg\"\n\t\t\t\t\tviewBox=\"0 0 24 24\"\n\t\t\t\t\tfill=\"none\"\n\t\t\t\t\tstroke=\"currentColor\"\n\t\t\t\t\tstroke-width=\"2\"\n\t\t\t\t\tstroke-linecap=\"round\"\n\t\t\t\t\tstroke-linejoin=\"round\"\n\t\t\t\t\tclass=\"feather feather-thumbs-up block w-full h-full\"\n\t\t\t\t>\n\t\t\t\t\t<path\n\t\t\t\t\t\td=\"M14 9V5a3 3 0 0 0-3-3l-4 9v11h11.28a2 2 0 0 0 2-1.7l1.38-9a2 2 0 0 0-2-2.3zM7 22H4a2 2 0 0 1-2-2v-7a2 2 0 0 1 2-2h3\"\n\t\t\t\t\t><\/path>\n\t\t\t\t<\/svg>\n\t\t\t\t<span class=\"sr-only\"> Yes <\/span>\n\t\t\t<\/button>\n\n\t\t\t<button\n\t\t\t\tdata-response=\"0\"\n\t\t\t\tdata-post=\"326\"\n\t\t\t\tdata-post-url=\"https:\/\/www.sqlservertutorial.net\/sql-server-basics\/sql-server-or\/\"\n\t\t\t\tdata-post-title=\"SQL Server OR Operator\"\n\t\t\t\tclass=\"wth-btn-rounded wth-no-btn\"\n\t\t\t>\n\t\t\t\t<svg\n\t\t\t\t\txmlns=\"http:\/\/www.w3.org\/2000\/svg\"\n\t\t\t\t\tviewBox=\"0 0 24 24\"\n\t\t\t\t\tfill=\"none\"\n\t\t\t\t\tstroke=\"currentColor\"\n\t\t\t\t\tstroke-width=\"2\"\n\t\t\t\t\tstroke-linecap=\"round\"\n\t\t\t\t\tstroke-linejoin=\"round\"\n\t\t\t\t>\n\t\t\t\t\t<path\n\t\t\t\t\t\td=\"M10 15v4a3 3 0 0 0 3 3l4-9V2H5.72a2 2 0 0 0-2 1.7l-1.38 9a2 2 0 0 0 2 2.3zm7-13h2.67A2.31 2.31 0 0 1 22 4v7a2.31 2.31 0 0 1-2.33 2H17\"\n\t\t\t\t\t><\/path>\n\t\t\t\t<\/svg>\n\t\t\t\t<span class=\"sr-only\"> No <\/span>\n\t\t\t<\/button>\n\t\t<\/div>\n\t<\/header>\n\n\t<div class=\"wth-form hidden\">\n\t\t<div class=\"wth-form-wrapper\">\n\t\t\t<div class=\"wth-title\"><\/div>\n\t\t\t\n\t\t\t<textarea class=\"wth-message\"><\/textarea>\n\n\t\t\t<button class=\"btn btn-primary wth-btn-submit\">Send<\/button>\n\t\t\t<button class=\"btn wth-btn-cancel\">Cancel<\/button>\n\t\t\n\t\t<\/div>\n\t<\/div>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>In this tutorial, you will learn how to use the SQL Server OR operator to combine two Boolean expressions.<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":100,"menu_order":8,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-326","page","type-page","status-publish","hentry"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.5 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>SQL Server OR Operator<\/title>\n<meta name=\"description\" content=\"This tutorial introduces you to the SQL Server OR operator and shows you how to use it to combine two Boolean expressions.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.sqlservertutorial.net\/sql-server-basics\/sql-server-or\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"SQL Server OR Operator\" \/>\n<meta property=\"og:description\" content=\"This tutorial introduces you to the SQL Server OR operator and shows you how to use it to combine two Boolean expressions.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.sqlservertutorial.net\/sql-server-basics\/sql-server-or\/\" \/>\n<meta property=\"og:site_name\" content=\"SQL Server Tutorial\" \/>\n<meta property=\"article:modified_time\" content=\"2024-03-02T08:39:55+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.sqlservertutorial.net\/wp-content\/uploads\/products.png\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data1\" content=\"3 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.sqlservertutorial.net\\\/sql-server-basics\\\/sql-server-or\\\/\",\"url\":\"https:\\\/\\\/www.sqlservertutorial.net\\\/sql-server-basics\\\/sql-server-or\\\/\",\"name\":\"SQL Server OR Operator\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.sqlservertutorial.net\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.sqlservertutorial.net\\\/sql-server-basics\\\/sql-server-or\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.sqlservertutorial.net\\\/sql-server-basics\\\/sql-server-or\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.sqlservertutorial.net\\\/wp-content\\\/uploads\\\/products.png\",\"datePublished\":\"2018-04-30T14:17:55+00:00\",\"dateModified\":\"2024-03-02T08:39:55+00:00\",\"description\":\"This tutorial introduces you to the SQL Server OR operator and shows you how to use it to combine two Boolean expressions.\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.sqlservertutorial.net\\\/sql-server-basics\\\/sql-server-or\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.sqlservertutorial.net\\\/sql-server-basics\\\/sql-server-or\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.sqlservertutorial.net\\\/sql-server-basics\\\/sql-server-or\\\/#primaryimage\",\"url\":\"https:\\\/\\\/www.sqlservertutorial.net\\\/wp-content\\\/uploads\\\/products.png\",\"contentUrl\":\"https:\\\/\\\/www.sqlservertutorial.net\\\/wp-content\\\/uploads\\\/products.png\",\"width\":206,\"height\":169,\"caption\":\"products\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.sqlservertutorial.net\\\/sql-server-basics\\\/sql-server-or\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.sqlservertutorial.net\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"SQL Server Basics\",\"item\":\"https:\\\/\\\/www.sqlservertutorial.net\\\/sql-server-basics\\\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"SQL Server OR Operator\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.sqlservertutorial.net\\\/#website\",\"url\":\"https:\\\/\\\/www.sqlservertutorial.net\\\/\",\"name\":\"SQL Server Tutorial\",\"description\":\"The Practical SQL Server Tutorial\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.sqlservertutorial.net\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"SQL Server OR Operator","description":"This tutorial introduces you to the SQL Server OR operator and shows you how to use it to combine two Boolean expressions.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.sqlservertutorial.net\/sql-server-basics\/sql-server-or\/","og_locale":"en_US","og_type":"article","og_title":"SQL Server OR Operator","og_description":"This tutorial introduces you to the SQL Server OR operator and shows you how to use it to combine two Boolean expressions.","og_url":"https:\/\/www.sqlservertutorial.net\/sql-server-basics\/sql-server-or\/","og_site_name":"SQL Server Tutorial","article_modified_time":"2024-03-02T08:39:55+00:00","og_image":[{"url":"https:\/\/www.sqlservertutorial.net\/wp-content\/uploads\/products.png","type":"","width":"","height":""}],"twitter_card":"summary_large_image","twitter_misc":{"Est. reading time":"3 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.sqlservertutorial.net\/sql-server-basics\/sql-server-or\/","url":"https:\/\/www.sqlservertutorial.net\/sql-server-basics\/sql-server-or\/","name":"SQL Server OR Operator","isPartOf":{"@id":"https:\/\/www.sqlservertutorial.net\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.sqlservertutorial.net\/sql-server-basics\/sql-server-or\/#primaryimage"},"image":{"@id":"https:\/\/www.sqlservertutorial.net\/sql-server-basics\/sql-server-or\/#primaryimage"},"thumbnailUrl":"https:\/\/www.sqlservertutorial.net\/wp-content\/uploads\/products.png","datePublished":"2018-04-30T14:17:55+00:00","dateModified":"2024-03-02T08:39:55+00:00","description":"This tutorial introduces you to the SQL Server OR operator and shows you how to use it to combine two Boolean expressions.","breadcrumb":{"@id":"https:\/\/www.sqlservertutorial.net\/sql-server-basics\/sql-server-or\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.sqlservertutorial.net\/sql-server-basics\/sql-server-or\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.sqlservertutorial.net\/sql-server-basics\/sql-server-or\/#primaryimage","url":"https:\/\/www.sqlservertutorial.net\/wp-content\/uploads\/products.png","contentUrl":"https:\/\/www.sqlservertutorial.net\/wp-content\/uploads\/products.png","width":206,"height":169,"caption":"products"},{"@type":"BreadcrumbList","@id":"https:\/\/www.sqlservertutorial.net\/sql-server-basics\/sql-server-or\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.sqlservertutorial.net\/"},{"@type":"ListItem","position":2,"name":"SQL Server Basics","item":"https:\/\/www.sqlservertutorial.net\/sql-server-basics\/"},{"@type":"ListItem","position":3,"name":"SQL Server OR Operator"}]},{"@type":"WebSite","@id":"https:\/\/www.sqlservertutorial.net\/#website","url":"https:\/\/www.sqlservertutorial.net\/","name":"SQL Server Tutorial","description":"The Practical SQL Server Tutorial","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.sqlservertutorial.net\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"}]}},"_links":{"self":[{"href":"https:\/\/www.sqlservertutorial.net\/wp-json\/wp\/v2\/pages\/326","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.sqlservertutorial.net\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/www.sqlservertutorial.net\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/www.sqlservertutorial.net\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.sqlservertutorial.net\/wp-json\/wp\/v2\/comments?post=326"}],"version-history":[{"count":3,"href":"https:\/\/www.sqlservertutorial.net\/wp-json\/wp\/v2\/pages\/326\/revisions"}],"predecessor-version":[{"id":3407,"href":"https:\/\/www.sqlservertutorial.net\/wp-json\/wp\/v2\/pages\/326\/revisions\/3407"}],"up":[{"embeddable":true,"href":"https:\/\/www.sqlservertutorial.net\/wp-json\/wp\/v2\/pages\/100"}],"wp:attachment":[{"href":"https:\/\/www.sqlservertutorial.net\/wp-json\/wp\/v2\/media?parent=326"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}