﻿{"id":312,"date":"2014-10-12T12:52:47","date_gmt":"2014-10-12T12:52:47","guid":{"rendered":"http:\/\/www.codereview.co\/?p=312"},"modified":"2014-10-13T10:50:35","modified_gmt":"2014-10-13T10:50:35","slug":"what-is-a-dirty-read","status":"publish","type":"post","link":"http:\/\/www.codereview.co\/index.php\/sql-server-tutorials\/what-is-a-dirty-read\/","title":{"rendered":"Sql Interview question #1 : What is a dirty read?"},"content":{"rendered":"<p><b>Question<\/b><\/p>\n<p>What is a dirty read?<!--more--><\/p>\n<p><span style=\"color: #000000;\"><b>Answer<\/b><\/span><\/p>\n<p><span style=\"color: #000000;\">A dirty read occurs when two operations, say, READ and WRITE occur together giving the incorrect or intermediate data. Suppose, User1 changed a row but did not commit the changes and User2 then reads the uncommitted data. The data may be wrong if User 2 does a rollback because the intermediate data may never have been committed. <\/span><\/p>\n<p><span style=\"color: #000000;\">Because data in the intermediate state may never have been committed, it is considered a dirty read.<\/span><\/p>\n<p><span style=\"color: #000000;\"><strong>\u00a0<\/strong><\/span><\/p>\n<p><span style=\"color: #000000;\"><strong>Thanks for reading this article,<\/strong><\/span><\/p>\n<p><span style=\"color: #000000;\"><strong>Next<\/strong><\/span><\/p>\n<ol>\n<li><span style=\"color: #000000;\"><strong>Share this with your colleagues because Sharing is Learning<\/strong><\/span><\/li>\n<li><span style=\"color: #000000;\"><strong>Comment below if you need any assistance<\/strong><\/span><\/li>\n<\/ol>\n","protected":false},"excerpt":{"rendered":"<p>Question What is a dirty read?<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[172,3],"tags":[165,166,13,12],"_links":{"self":[{"href":"http:\/\/www.codereview.co\/index.php\/wp-json\/wp\/v2\/posts\/312"}],"collection":[{"href":"http:\/\/www.codereview.co\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.codereview.co\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.codereview.co\/index.php\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"http:\/\/www.codereview.co\/index.php\/wp-json\/wp\/v2\/comments?post=312"}],"version-history":[{"count":7,"href":"http:\/\/www.codereview.co\/index.php\/wp-json\/wp\/v2\/posts\/312\/revisions"}],"predecessor-version":[{"id":327,"href":"http:\/\/www.codereview.co\/index.php\/wp-json\/wp\/v2\/posts\/312\/revisions\/327"}],"wp:attachment":[{"href":"http:\/\/www.codereview.co\/index.php\/wp-json\/wp\/v2\/media?parent=312"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.codereview.co\/index.php\/wp-json\/wp\/v2\/categories?post=312"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.codereview.co\/index.php\/wp-json\/wp\/v2\/tags?post=312"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}