{"id":152,"date":"2021-08-19T20:23:09","date_gmt":"2021-08-19T16:53:09","guid":{"rendered":"https:\/\/iapi.ir\/?p=152"},"modified":"2021-08-19T20:23:11","modified_gmt":"2021-08-19T16:53:11","slug":"sqlserver","status":"publish","type":"post","link":"https:\/\/iapi.ir\/index.php\/2021\/08\/19\/sqlserver\/","title":{"rendered":"SQLSERVER"},"content":{"rendered":"\n<p>subquery \/ If you want to receive all fields from two tables<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>SELECT * FROM terms WHERE id IN \n   (SELECT term_id FROM terms_relation WHERE taxonomy = \"categ\")<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>SELECT t.id, t.name, t.slug, tr.description, tr.created_at, tr.updated_at \n  FROM terms AS t \n   INNER JOIN terms_relation AS tr \n   ON t.id = tr.term_id AND tr.taxonomy = \"categ\"<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>subquery \/ If you want to receive all fields from two tables<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-152","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v14.3 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>SQLSERVER - IAPI.IR<\/title>\n<meta name=\"robots\" content=\"index, follow\" \/>\n<meta name=\"googlebot\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<meta name=\"bingbot\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/iapi.ir\/index.php\/2021\/08\/19\/sqlserver\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"SQLSERVER - IAPI.IR\" \/>\n<meta property=\"og:description\" content=\"subquery \/ If you want to receive all fields from two tables\" \/>\n<meta property=\"og:url\" content=\"https:\/\/iapi.ir\/index.php\/2021\/08\/19\/sqlserver\/\" \/>\n<meta property=\"og:site_name\" content=\"IAPI.IR\" \/>\n<meta property=\"article:published_time\" content=\"2021-08-19T16:53:09+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2021-08-19T16:53:11+00:00\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebSite\",\"@id\":\"https:\/\/iapi.ir\/#website\",\"url\":\"https:\/\/iapi.ir\/\",\"name\":\"IAPI.IR\",\"description\":\"\\u0622\\u0645\\u0648\\u0632\\u0634 \\u0647\\u0627\\u06cc \\u0628\\u0631\\u0646\\u0627\\u0645\\u0647 \\u0646\\u0648\\u06cc\\u0633\\u06cc \\u0648 \\u0627\\u0644\\u06a9\\u062a\\u0631\\u0648\\u0646\\u06cc\\u06a9 \\u0648 \\u0627\\u0644\\u06a9\\u062a\\u0631\\u0648\\u0645\\u06a9\\u0627\\u0646\\u06cc\\u06a9\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":\"https:\/\/iapi.ir\/?s={search_term_string}\",\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-US\"},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/iapi.ir\/index.php\/2021\/08\/19\/sqlserver\/#webpage\",\"url\":\"https:\/\/iapi.ir\/index.php\/2021\/08\/19\/sqlserver\/\",\"name\":\"SQLSERVER - IAPI.IR\",\"isPartOf\":{\"@id\":\"https:\/\/iapi.ir\/#website\"},\"datePublished\":\"2021-08-19T16:53:09+00:00\",\"dateModified\":\"2021-08-19T16:53:11+00:00\",\"author\":{\"@id\":\"https:\/\/iapi.ir\/#\/schema\/person\/5757676943db35b416789ba141d9f76a\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/iapi.ir\/index.php\/2021\/08\/19\/sqlserver\/\"]}]},{\"@type\":[\"Person\"],\"@id\":\"https:\/\/iapi.ir\/#\/schema\/person\/5757676943db35b416789ba141d9f76a\",\"name\":\"jPFldBRmCc\",\"image\":{\"@type\":\"ImageObject\",\"@id\":\"https:\/\/iapi.ir\/#personlogo\",\"inLanguage\":\"en-US\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/f9a5bbf8f5b1847b1faba943c87797fb01dbb36a584debe6aa7c8fb65ef9eeb9?s=96&d=mm&r=g\",\"caption\":\"jPFldBRmCc\"}}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","_links":{"self":[{"href":"https:\/\/iapi.ir\/index.php\/wp-json\/wp\/v2\/posts\/152","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/iapi.ir\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/iapi.ir\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/iapi.ir\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/iapi.ir\/index.php\/wp-json\/wp\/v2\/comments?post=152"}],"version-history":[{"count":1,"href":"https:\/\/iapi.ir\/index.php\/wp-json\/wp\/v2\/posts\/152\/revisions"}],"predecessor-version":[{"id":153,"href":"https:\/\/iapi.ir\/index.php\/wp-json\/wp\/v2\/posts\/152\/revisions\/153"}],"wp:attachment":[{"href":"https:\/\/iapi.ir\/index.php\/wp-json\/wp\/v2\/media?parent=152"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/iapi.ir\/index.php\/wp-json\/wp\/v2\/categories?post=152"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/iapi.ir\/index.php\/wp-json\/wp\/v2\/tags?post=152"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}