{"id":1997,"date":"2016-08-10T21:21:00","date_gmt":"2016-08-11T04:21:00","guid":{"rendered":"https:\/\/www.virendrachandak.com\/techtalk\/?p=1997"},"modified":"2019-09-22T15:23:29","modified_gmt":"2019-09-22T22:23:29","slug":"mysql-int11-what-does-it-means","status":"publish","type":"post","link":"https:\/\/www.virendrachandak.com\/techtalk\/mysql-int11-what-does-it-means\/","title":{"rendered":"What does int(11) means in MySQL?"},"content":{"rendered":"<p>A very common misconception about what int(11) means in MySQL is that the column can store maximum integer value with 11 digits in length. However, this is not true. int(11) does not determines the maximum value that the column can store in it. 11 is the display width of the integer column, unlike the characters columns where the number means number of character that can be stored.<br \/>\n<!--more--><br \/>\nThe number in the parenthesis does not determines the max and min values that can be stored in the integer field. The max and min values that can be stored are always fixed. The following table shows the required storage and range for each integer type.<\/p>\n<table border=\"1\">\n<colgroup>\n<col \/>\n<col \/>\n<col \/>\n<col \/><\/colgroup>\n<thead>\n<tr>\n<th scope=\"col\">Type<\/th>\n<th scope=\"col\">Storage<\/th>\n<th scope=\"col\">Minimum Value<\/th>\n<th scope=\"col\">Maximum Value<\/th>\n<\/tr>\n<tr>\n<th scope=\"col\"><\/th>\n<th scope=\"col\">(Bytes)<\/th>\n<th scope=\"col\">(Signed\/Unsigned)<\/th>\n<th scope=\"col\">(Signed\/Unsigned)<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td scope=\"row\">TINYINT<\/td>\n<td>1<\/td>\n<td>-128<\/td>\n<td>127<\/td>\n<\/tr>\n<tr>\n<td scope=\"row\"><\/td>\n<td><\/td>\n<td>0<\/td>\n<td>255<\/td>\n<\/tr>\n<tr>\n<td scope=\"row\">SMALLINT<\/td>\n<td>2<\/td>\n<td>-32768<\/td>\n<td>32767<\/td>\n<\/tr>\n<tr>\n<td scope=\"row\"><\/td>\n<td><\/td>\n<td>0<\/td>\n<td>65535<\/td>\n<\/tr>\n<tr>\n<td scope=\"row\">MEDIUMINT<\/td>\n<td>3<\/td>\n<td>-8388608<\/td>\n<td>8388607<\/td>\n<\/tr>\n<tr>\n<td scope=\"row\"><\/td>\n<td><\/td>\n<td>0<\/td>\n<td>16777215<\/td>\n<\/tr>\n<tr>\n<td scope=\"row\">INT<\/td>\n<td>4<\/td>\n<td>-2147483648<\/td>\n<td>2147483647<\/td>\n<\/tr>\n<tr>\n<td scope=\"row\"><\/td>\n<td><\/td>\n<td>0<\/td>\n<td>4294967295<\/td>\n<\/tr>\n<tr>\n<td scope=\"row\">BIGINT<\/td>\n<td>8<\/td>\n<td>-9223372036854775808<\/td>\n<td>9223372036854775807<\/td>\n<\/tr>\n<tr>\n<td scope=\"row\"><\/td>\n<td><\/td>\n<td>0<\/td>\n<td>18446744073709551615<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>Source: <a href=\"https:\/\/dev.mysql.com\/doc\/refman\/5.7\/en\/integer-types.html\" target=\"_blank\" rel=\"noopener noreferrer\">Integer Types (Exact Value) &#8211; INTEGER, INT, SMALLINT, TINYINT, MEDIUMINT, BIGINT<\/a><\/p>\n<h3> So what is it?<\/h3>\n<p>For an integer type of column the numbers in the parentheses is called the display width of the field. This is different from what it means for other types of fields. For floating types it is the total number of digits. For character fields it is the maximum number of characters that can be stored, e.g VARCHAR(20) can store 20 characters.<\/p>\n<p>The display width of the column does not affects the maximum value that can be stored in that column. A column with INT(5) or INT(11) can store the same maximum values. Also, if you have a column INT(20) that does not means that you will be able to store 20 digit values (BIGINT values). The column still will store only till the max values of INT.<\/p>\n<p>The number for each type of integer by default is same as the number of characters in the largest negative value of that type. The largest negative value for an integer is -2147483648 which is 11 characters and hence the default display width is 11. Similarly for BIGINT the default display width is 20 which is equal to the number of characters in the largest negative BIGINT (-9223372036854775808).<\/p>\n<h3> What is its use?<\/h3>\n<p>The display width of an integer type of column does not actually do anything unless the column is an UNSIGNED ZEROFILL. In this case if the number to be stored is less than 11 characters (for INT(11)) then those numbers will be zero-padded on the left. ZEROFILL implicitly makes the column unsigned so it cannot store negative numbers, hence there are no negative numbers in a ZEROFILL column.<\/p>\n<p>Here is an example of how this the display value affect the columns which are UNSIGNED ZEROFILL.<\/p>\n<h4>Command to create the table<\/h4>\n<pre>CREATE TABLE zerofill_demo (\r\n\tid INT(11) NOT NULL AUTO_INCREMENT,\r\n\ta INT(11) NOT NULL,\r\n\tb INT(11) UNSIGNED ZEROFILL NOT NULL,\r\n\tc INT(5) DEFAULT NULL,\r\n\td INT(5) UNSIGNED ZEROFILL NOT NULL,\r\n\te INT(15) DEFAULT NULL,\r\n\tPRIMARY KEY (`id`)\r\n)<\/pre>\n<p><\/p>\n<h4>Commands to insert data into the table:<\/h4>\n<pre>INSERT INTO zerofill_demo (a, b, c, d, e) VALUES (1, 1, 1, 1, 1);\r\nINSERT INTO zerofill_demo (a, b, c, d, e) VALUES (1234567890, 1234567890, 1234567890, 1234567890, 1234567890);<\/pre>\n<h4>Data as stored in the table<\/h4>\n<pre>\r\n+----+------------+-------------+------------+------------+------------+\r\n| id | a          | b           | c          | d          | e          |\r\n+----+------------+-------------+------------+------------+------------+\r\n|  1 |          1 | 00000000001 |          1 |      00001 |          1 |\r\n|  2 | 1234567890 | 01234567890 | 1234567890 | 1234567890 | 1234567890 |\r\n+----+------------+-------------+------------+------------+------------+\r\n<\/pre>\n<p>\nThe above helps use understand the following:<\/p>\n<ul>\n<li>If the column has ZEROFILL it will always store the number of characters for that column. In our example the column b will always store integers with minimum 11 characters<\/li>\n<li>The display width does not restrict the values that can be stored in a column. We can still store value till max allowed value of INT in a INT(5) column (columns c and d in our example)<\/li>\n<\/ul>\n<h3> What is the use of display width if the field is not UNSIGNED ZEROFILL<\/h3>\n<p>If a column is not UNSIGNED ZEROFILL mysql command line does not uses the display width. However, other applications can use it if they want. Applications can fetch the metadata to get the display width for the column and then use it for something like setting the width of a column or displaying the numbers in a column, etc. Here is an example in PHP that can be used to display values in a table so that they can be right aligned and padded correctly.<\/p>\n<pre class=\"brush: php; title: ; notranslate\" title=\"\">\r\n$result = $mysqli-&gt;query('SELECT e FROM zerofill_demo WHERE id = 1');\r\n$metadata = $result-&gt;fetch_field_direct(0); \/\/ fetch metadata from first field (e)\r\n$length = $metadata-&gt;length; \/\/ get the length from it\r\n$row = $result-&gt;fetch_assoc();\r\nprintf(&quot;%$0{$length}d\\n&quot;, $row&#x5B;'e']); \/\/ prints e in a column 15 chars wide\r\n<\/pre>\n<p>The above code will output the value of e as <\/p>\n<pre>000000000000001<\/pre>\n<p>\nCheck out the demo to see how the display width can be used.<br \/>\n<a id=\"demo_link\" data-title=\"View Demo\" href=\"https:\/\/www.virendrachandak.com\/demos\/mysql-int11-what-does-it-means.php\"><i class=\"icon fa fa-camera-retro\"><\/i> View Demo<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>A very common misconception about what int(11) means in MySQL is that the column can store maximum integer value with 11 digits in length. However, this is not true. int(11) does not determines the maximum value that the column can store in it. 11 is the display width of the integer column, unlike the characters [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_monsterinsights_skip_tracking":false,"site-sidebar-layout":"default","site-content-layout":"","ast-site-content-layout":"default","site-content-style":"default","site-sidebar-style":"default","ast-global-header-display":"","ast-banner-title-visibility":"","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"","ast-breadcrumbs-content":"","ast-featured-img":"","footer-sml-layout":"","ast-disable-related-posts":"","theme-transparent-header-meta":"","adv-header-id-meta":"","stick-header-meta":"","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":"","astra-migrate-meta-layouts":"default","ast-page-background-enabled":"default","ast-page-background-meta":{"desktop":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"ast-content-background-meta":{"desktop":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_feature_clip_id":0,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2},"jetpack_post_was_ever_published":false},"categories":[48],"tags":[154,153],"class_list":["post-1997","post","type-post","status-publish","format-standard","hentry","category-mysql","tag-display-width","tag-zerofill"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v28.5 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>What does int(11) means in MySQL? - Virendra&#039;s TechTalk<\/title>\n<meta name=\"description\" content=\"A very common misconception about what int(11) means in MySQL is that the column can store maximum integer value with 11 digits in length. However, this\" \/>\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.virendrachandak.com\/techtalk\/mysql-int11-what-does-it-means\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"What does int(11) means in MySQL? - Virendra&#039;s TechTalk\" \/>\n<meta property=\"og:description\" content=\"A very common misconception about what int(11) means in MySQL is that the column can store maximum integer value with 11 digits in length. However, this\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.virendrachandak.com\/techtalk\/mysql-int11-what-does-it-means\/\" \/>\n<meta property=\"og:site_name\" content=\"Virendra&#039;s TechTalk\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/virendrachandak\" \/>\n<meta property=\"article:author\" content=\"https:\/\/www.facebook.com\/virendrachandak\" \/>\n<meta property=\"article:published_time\" content=\"2016-08-11T04:21:00+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2019-09-22T22:23:29+00:00\" \/>\n<meta name=\"author\" content=\"Virendra Chandak\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@virendrachandak\" \/>\n<meta name=\"twitter:site\" content=\"@virendrachandak\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Virendra Chandak\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"4 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.virendrachandak.com\\\/techtalk\\\/mysql-int11-what-does-it-means\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.virendrachandak.com\\\/techtalk\\\/mysql-int11-what-does-it-means\\\/\"},\"author\":{\"name\":\"Virendra Chandak\",\"@id\":\"https:\\\/\\\/www.virendrachandak.com\\\/techtalk\\\/#\\\/schema\\\/person\\\/63f7ffa1ea125e32af9618d188349e17\"},\"headline\":\"What does int(11) means in MySQL?\",\"datePublished\":\"2016-08-11T04:21:00+00:00\",\"dateModified\":\"2019-09-22T22:23:29+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.virendrachandak.com\\\/techtalk\\\/mysql-int11-what-does-it-means\\\/\"},\"wordCount\":704,\"commentCount\":8,\"publisher\":{\"@id\":\"https:\\\/\\\/www.virendrachandak.com\\\/techtalk\\\/#\\\/schema\\\/person\\\/63f7ffa1ea125e32af9618d188349e17\"},\"keywords\":[\"display width\",\"zerofill\"],\"articleSection\":[\"MySQL\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/www.virendrachandak.com\\\/techtalk\\\/mysql-int11-what-does-it-means\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.virendrachandak.com\\\/techtalk\\\/mysql-int11-what-does-it-means\\\/\",\"url\":\"https:\\\/\\\/www.virendrachandak.com\\\/techtalk\\\/mysql-int11-what-does-it-means\\\/\",\"name\":\"What does int(11) means in MySQL? - Virendra&#039;s TechTalk\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.virendrachandak.com\\\/techtalk\\\/#website\"},\"datePublished\":\"2016-08-11T04:21:00+00:00\",\"dateModified\":\"2019-09-22T22:23:29+00:00\",\"description\":\"A very common misconception about what int(11) means in MySQL is that the column can store maximum integer value with 11 digits in length. However, this\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.virendrachandak.com\\\/techtalk\\\/mysql-int11-what-does-it-means\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.virendrachandak.com\\\/techtalk\\\/mysql-int11-what-does-it-means\\\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.virendrachandak.com\\\/techtalk\\\/mysql-int11-what-does-it-means\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"TechTalk\",\"item\":\"https:\\\/\\\/www.virendrachandak.com\\\/techtalk\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"MySQL\",\"item\":\"https:\\\/\\\/www.virendrachandak.com\\\/techtalk\\\/category\\\/mysql\\\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"What does int(11) means in MySQL?\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.virendrachandak.com\\\/techtalk\\\/#website\",\"url\":\"https:\\\/\\\/www.virendrachandak.com\\\/techtalk\\\/\",\"name\":\"Virendra's TechTalk\",\"description\":\"\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.virendrachandak.com\\\/techtalk\\\/#\\\/schema\\\/person\\\/63f7ffa1ea125e32af9618d188349e17\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.virendrachandak.com\\\/techtalk\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":[\"Person\",\"Organization\"],\"@id\":\"https:\\\/\\\/www.virendrachandak.com\\\/techtalk\\\/#\\\/schema\\\/person\\\/63f7ffa1ea125e32af9618d188349e17\",\"name\":\"Virendra Chandak\",\"logo\":{\"@id\":\"https:\\\/\\\/www.virendrachandak.com\\\/techtalk\\\/#\\\/schema\\\/person\\\/image\\\/\"},\"sameAs\":[\"https:\\\/\\\/www.virendrachandak.com\",\"https:\\\/\\\/www.facebook.com\\\/virendrachandak\",\"https:\\\/\\\/www.linkedin.com\\\/in\\\/virendrachandak\\\/\",\"https:\\\/\\\/x.com\\\/virendrachandak\"]}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"What does int(11) means in MySQL? - Virendra&#039;s TechTalk","description":"A very common misconception about what int(11) means in MySQL is that the column can store maximum integer value with 11 digits in length. However, this","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.virendrachandak.com\/techtalk\/mysql-int11-what-does-it-means\/","og_locale":"en_US","og_type":"article","og_title":"What does int(11) means in MySQL? - Virendra&#039;s TechTalk","og_description":"A very common misconception about what int(11) means in MySQL is that the column can store maximum integer value with 11 digits in length. However, this","og_url":"https:\/\/www.virendrachandak.com\/techtalk\/mysql-int11-what-does-it-means\/","og_site_name":"Virendra&#039;s TechTalk","article_publisher":"https:\/\/www.facebook.com\/virendrachandak","article_author":"https:\/\/www.facebook.com\/virendrachandak","article_published_time":"2016-08-11T04:21:00+00:00","article_modified_time":"2019-09-22T22:23:29+00:00","author":"Virendra Chandak","twitter_card":"summary_large_image","twitter_creator":"@virendrachandak","twitter_site":"@virendrachandak","twitter_misc":{"Written by":"Virendra Chandak","Est. reading time":"4 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.virendrachandak.com\/techtalk\/mysql-int11-what-does-it-means\/#article","isPartOf":{"@id":"https:\/\/www.virendrachandak.com\/techtalk\/mysql-int11-what-does-it-means\/"},"author":{"name":"Virendra Chandak","@id":"https:\/\/www.virendrachandak.com\/techtalk\/#\/schema\/person\/63f7ffa1ea125e32af9618d188349e17"},"headline":"What does int(11) means in MySQL?","datePublished":"2016-08-11T04:21:00+00:00","dateModified":"2019-09-22T22:23:29+00:00","mainEntityOfPage":{"@id":"https:\/\/www.virendrachandak.com\/techtalk\/mysql-int11-what-does-it-means\/"},"wordCount":704,"commentCount":8,"publisher":{"@id":"https:\/\/www.virendrachandak.com\/techtalk\/#\/schema\/person\/63f7ffa1ea125e32af9618d188349e17"},"keywords":["display width","zerofill"],"articleSection":["MySQL"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.virendrachandak.com\/techtalk\/mysql-int11-what-does-it-means\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.virendrachandak.com\/techtalk\/mysql-int11-what-does-it-means\/","url":"https:\/\/www.virendrachandak.com\/techtalk\/mysql-int11-what-does-it-means\/","name":"What does int(11) means in MySQL? - Virendra&#039;s TechTalk","isPartOf":{"@id":"https:\/\/www.virendrachandak.com\/techtalk\/#website"},"datePublished":"2016-08-11T04:21:00+00:00","dateModified":"2019-09-22T22:23:29+00:00","description":"A very common misconception about what int(11) means in MySQL is that the column can store maximum integer value with 11 digits in length. However, this","breadcrumb":{"@id":"https:\/\/www.virendrachandak.com\/techtalk\/mysql-int11-what-does-it-means\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.virendrachandak.com\/techtalk\/mysql-int11-what-does-it-means\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.virendrachandak.com\/techtalk\/mysql-int11-what-does-it-means\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"TechTalk","item":"https:\/\/www.virendrachandak.com\/techtalk\/"},{"@type":"ListItem","position":2,"name":"MySQL","item":"https:\/\/www.virendrachandak.com\/techtalk\/category\/mysql\/"},{"@type":"ListItem","position":3,"name":"What does int(11) means in MySQL?"}]},{"@type":"WebSite","@id":"https:\/\/www.virendrachandak.com\/techtalk\/#website","url":"https:\/\/www.virendrachandak.com\/techtalk\/","name":"Virendra's TechTalk","description":"","publisher":{"@id":"https:\/\/www.virendrachandak.com\/techtalk\/#\/schema\/person\/63f7ffa1ea125e32af9618d188349e17"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.virendrachandak.com\/techtalk\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":["Person","Organization"],"@id":"https:\/\/www.virendrachandak.com\/techtalk\/#\/schema\/person\/63f7ffa1ea125e32af9618d188349e17","name":"Virendra Chandak","logo":{"@id":"https:\/\/www.virendrachandak.com\/techtalk\/#\/schema\/person\/image\/"},"sameAs":["https:\/\/www.virendrachandak.com","https:\/\/www.facebook.com\/virendrachandak","https:\/\/www.linkedin.com\/in\/virendrachandak\/","https:\/\/x.com\/virendrachandak"]}]}},"jetpack_publicize_connections":[],"jetpack_shortlink":"https:\/\/wp.me\/p2vTtQ-wd","jetpack_sharing_enabled":true,"jetpack-related-posts":[{"id":2762,"url":"https:\/\/www.virendrachandak.com\/techtalk\/clickhouse-for-mysql-developers\/","url_meta":{"origin":1997,"position":0},"title":"ClickHouse for MySQL Developers: What&#8217;s Different and Why","author":"Virendra Chandak","date":"August 18, 2026","format":false,"excerpt":"ClickHouse uses SQL and looks familiar, but it is not \"MySQL but faster.\" What a MySQL developer needs to know before using it \u2014 columnar storage, no enforced primary key, append-only writes, batch inserts, and denormalized joins \u2014 with runnable Docker examples.","rel":"","context":"In &quot;Clickhouse&quot;","block_context":{"text":"Clickhouse","link":"https:\/\/www.virendrachandak.com\/techtalk\/category\/clickhouse\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":1239,"url":"https:\/\/www.virendrachandak.com\/techtalk\/how-to-get-size-of-blob-in-mysql\/","url_meta":{"origin":1997,"position":1},"title":"How to get size of BLOB in MySQL","author":"Virendra Chandak","date":"December 23, 2012","format":false,"excerpt":"Recently I wanted to get the size of the data stored in the BLOB field of a MySQL table. BLOB is a field which can be used to store variable amount of data. There is a simple MySQL String function, to find the size of BLOB data, OCTET_LENGTH. This function\u2026","rel":"","context":"In &quot;MySQL&quot;","block_context":{"text":"MySQL","link":"https:\/\/www.virendrachandak.com\/techtalk\/category\/mysql\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":1968,"url":"https:\/\/www.virendrachandak.com\/techtalk\/creating-csv-file-using-php-and-mysql\/","url_meta":{"origin":1997,"position":2},"title":"How to create CSV file using PHP","author":"Virendra Chandak","date":"April 19, 2015","format":false,"excerpt":"CSV (comma-separated values) is one of the most popular methods for transferring tabular data between applications. Lot of applications want to export data in a CSV file. In this article we will see how we can create CSV file using PHP. We will also see how to automatically download the\u2026","rel":"","context":"In &quot;PHP&quot;","block_context":{"text":"PHP","link":"https:\/\/www.virendrachandak.com\/techtalk\/category\/php\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":802,"url":"https:\/\/www.virendrachandak.com\/techtalk\/voting-functionality-in-a-website\/","url_meta":{"origin":1997,"position":3},"title":"Voting Functionality in a website","author":"Virendra Chandak","date":"April 10, 2011","format":false,"excerpt":"In this post I will give the step by step explanation of how we can add Voting Functionality to a website. At the end of this article we will have a working sample voting application. The source code for the sample voting application can be downloaded from here. We will\u2026","rel":"","context":"In &quot;Functionality&quot;","block_context":{"text":"Functionality","link":"https:\/\/www.virendrachandak.com\/techtalk\/category\/functionality\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/www.virendrachandak.com\/techtalk\/wp-content\/uploads\/2011\/10\/initial.png?resize=350%2C200","width":350,"height":200},"classes":[]},{"id":2769,"url":"https:\/\/www.virendrachandak.com\/techtalk\/what-is-clickhouse\/","url_meta":{"origin":1997,"position":4},"title":"What Is ClickHouse, and When Should You Use It?","author":"Virendra Chandak","date":"July 21, 2026","format":false,"excerpt":"ClickHouse is an open-source columnar database built for analytics at massive scale: fast aggregation and filtering over very large datasets. ClickHouse may look like a relational database, but it\u2019s engineered for a fundamentally different purpose than Postgres or MySQL, and treating it as a drop-in replacement is the most common\u2026","rel":"","context":"In &quot;Clickhouse&quot;","block_context":{"text":"Clickhouse","link":"https:\/\/www.virendrachandak.com\/techtalk\/category\/clickhouse\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":688,"url":"https:\/\/www.virendrachandak.com\/techtalk\/php-isset-vs-empty-vs-is_null\/","url_meta":{"origin":1997,"position":5},"title":"PHP isset() vs empty() vs is_null()","author":"Virendra Chandak","date":"January 21, 2012","format":false,"excerpt":"PHP has different functions which can be used to test the value of a variable. Three useful functions for this are isset(), empty() and is_null(). All these function return a boolean value. If these functions are not used in correct way they can cause unexpected results. isset() and empty() are\u2026","rel":"","context":"In &quot;PHP&quot;","block_context":{"text":"PHP","link":"https:\/\/www.virendrachandak.com\/techtalk\/category\/php\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]}],"jetpack_featured_media_url":"","_links":{"self":[{"href":"https:\/\/www.virendrachandak.com\/techtalk\/wp-json\/wp\/v2\/posts\/1997","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.virendrachandak.com\/techtalk\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.virendrachandak.com\/techtalk\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.virendrachandak.com\/techtalk\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.virendrachandak.com\/techtalk\/wp-json\/wp\/v2\/comments?post=1997"}],"version-history":[{"count":0,"href":"https:\/\/www.virendrachandak.com\/techtalk\/wp-json\/wp\/v2\/posts\/1997\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.virendrachandak.com\/techtalk\/wp-json\/wp\/v2\/media?parent=1997"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.virendrachandak.com\/techtalk\/wp-json\/wp\/v2\/categories?post=1997"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.virendrachandak.com\/techtalk\/wp-json\/wp\/v2\/tags?post=1997"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}