{"id":1626,"date":"2015-10-20T09:54:51","date_gmt":"2015-10-20T09:54:51","guid":{"rendered":"https:\/\/ibex.tech\/cloud\/?p=1626"},"modified":"2022-02-17T07:14:02","modified_gmt":"2022-02-17T07:14:02","slug":"top-limit-in-mysql","status":"publish","type":"post","link":"https:\/\/ibex.tech\/cloud\/sql-server\/queries-microsoft-sql-server\/select-statements\/top-limit-in-mysql","title":{"rendered":"TOP (LIMIT in mySql)"},"content":{"rendered":"<p>\nSQL Server doesn&#39;t use the LIMIT keyword, instead use TOP() to select the maximum number of rows to return:\n<\/p>\n<pre>\r\n<code>\r\n\tSqlCommand1-&gt;CommandText = &quot;SELECT TOP(1) SomeRowName \\\r\n\t\t\t\t\t\t\t   FROM SomeTableName \\\r\n\t\t\t\t\t\t\t   WHERE SomeRowName2 == 0&quot;;\r\n<\/code><\/pre>\n<p>\n&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>SQL Server doesn&#39;t use the LIMIT keyword, instead use TOP() to select the maximum number of rows to return: SqlCommand1-&gt;CommandText = &quot;SELECT TOP(1) SomeRowName \\ FROM SomeTableName \\ WHERE SomeRowName2 == 0&quot;; &nbsp;<\/p>\n","protected":false},"author":5,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[6],"tags":[],"class_list":["post-1626","post","type-post","status-publish","format-standard","hentry","category-select-statements"],"_links":{"self":[{"href":"https:\/\/ibex.tech\/cloud\/wp-json\/wp\/v2\/posts\/1626","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ibex.tech\/cloud\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ibex.tech\/cloud\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ibex.tech\/cloud\/wp-json\/wp\/v2\/users\/5"}],"replies":[{"embeddable":true,"href":"https:\/\/ibex.tech\/cloud\/wp-json\/wp\/v2\/comments?post=1626"}],"version-history":[{"count":1,"href":"https:\/\/ibex.tech\/cloud\/wp-json\/wp\/v2\/posts\/1626\/revisions"}],"predecessor-version":[{"id":1627,"href":"https:\/\/ibex.tech\/cloud\/wp-json\/wp\/v2\/posts\/1626\/revisions\/1627"}],"wp:attachment":[{"href":"https:\/\/ibex.tech\/cloud\/wp-json\/wp\/v2\/media?parent=1626"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ibex.tech\/cloud\/wp-json\/wp\/v2\/categories?post=1626"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ibex.tech\/cloud\/wp-json\/wp\/v2\/tags?post=1626"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}