{"id":254,"date":"2009-03-17T10:25:00","date_gmt":"1970-01-01T00:00:00","guid":{"rendered":"http:\/\/www.yazilimmutfagi.com\/?p=254"},"modified":"2009-03-17T10:25:00","modified_gmt":"1970-01-01T00:00:00","slug":"tablo-boyutlari-ve-satir-sayilari-bulmak","status":"publish","type":"post","link":"https:\/\/www.yazilimmutfagi.com\/index.php\/2009\/03\/17\/tablo-boyutlari-ve-satir-sayilari-bulmak\/","title":{"rendered":"Tablo Boyutlari ve Satir Sayilari Bulmak"},"content":{"rendered":"<p style=\"margin: 0cm 0cm 0pt; line-height: normal;\" class=\"MsoNormal\"><span style=\"font-size: 10pt; font-family: &quot;Courier New&quot;;\">Bir SQL Server veritabaniniz mi var. Veritabanindaki tablolarin boyutlarini ve satir sayilarini mi &ouml;grenmeniz gerekiyor. O zaman asagidaki T-SQL kodu &ccedil;alistirin, zaman kazanin.<\/span><\/p>\n<p style=\"margin: 0cm 0cm 0pt; line-height: normal;\" class=\"MsoNormal\"><span style=\"font-size: 10pt; font-family: &quot;Courier New&quot;;\"><br \/>\n&nbsp; <a href=\"http:\/\/www.yazilimmutfagi.com\/Makale\/Img\/Serhan\/TabloBoyutlari\/tabloveboyutlari.rar\">T-SQL kodunu buradan indirebilirsiniz<\/a><\/span><\/p>\n<p style=\"margin: 0cm 0cm 10pt;\" class=\"MsoNormal\">&nbsp;<a href='www.yazilimmutfagi.com'>.<\/a><\/p>\n<p style=\"margin: 0cm 0cm 10pt;\" class=\"MsoNormal\"><span style=\"font-size: small; font-family: Calibri;\">\n<table cellspacing=\"0\" cellpadding=\"0\" border=\"0\" style=\"margin: auto auto auto 5.4pt; background: rgb(238, 236, 225) none repeat scroll 0% 0%; -moz-background-clip: border; -moz-background-origin: padding; -moz-background-inline-policy: continuous; border-collapse: collapse;\" class=\"MsoTableGrid\">\n    <tbody>\n        <tr style=\"\">\n            <td valign=\"top\" width=\"699\" style=\"border: medium none rgb(240, 240, 240); padding: 0cm 5.4pt; width: 524.5pt; background-color: transparent;\">\n            <p style=\"margin: 0cm 0cm 0pt; line-height: normal;\" class=\"MsoNormal\"><span style=\"font-size: 10pt; color: green; font-family: &quot;Courier New&quot;;\">\/* Tablolar, isimlerine g&ouml;re siralanir *\/<\/span><\/p>\n            <p style=\"margin: 0cm 0cm 0pt; line-height: normal;\" class=\"MsoNormal\"><span style=\"font-size: 10pt; color: blue; font-family: &quot;Courier New&quot;;\">SELECT<\/span><span style=\"font-size: 10pt; font-family: &quot;Courier New&quot;;\"> <span style=\"color: fuchsia;\">ROW_NUMBER<\/span><span style=\"color: gray;\">()<\/span> <span style=\"color: blue;\">OVER <\/span><span style=\"color: gray;\">(<\/span><span style=\"color: blue;\">ORDER<\/span> <span style=\"color: blue;\">BY<\/span> TABLE_NAME<span style=\"color: gray;\">)<\/span> <span style=\"color: blue;\">AS<\/span> TABLE_NO<span style=\"color: gray;\">,<\/span> TABLE_NAME<span style=\"color: gray;\">,<\/span> TABLE_SCHEMA <span style=\"color: blue;\">INTO<\/span> #Tablo <span style=\"color: blue;\">FROM<\/span> <span style=\"color: green;\">INFORMATION_SCHEMA<\/span><span style=\"color: gray;\">.<\/span><span style=\"color: green;\">TABLES<\/span> <\/span><\/p>\n            <p style=\"margin: 0cm 0cm 0pt; line-height: normal;\" class=\"MsoNormal\"><span style=\"font-size: 10pt; font-family: &quot;Courier New&quot;;\">&nbsp;<\/span><\/p>\n            <p style=\"margin: 0cm 0cm 0pt; line-height: normal;\" class=\"MsoNormal\"><span style=\"font-size: 10pt; color: blue; font-family: &quot;Courier New&quot;;\">GO<\/span><\/p>\n            <p style=\"margin: 0cm 0cm 0pt; line-height: normal;\" class=\"MsoNormal\"><span style=\"font-size: 10pt; color: blue; font-family: &quot;Courier New&quot;;\">&nbsp;<\/span><\/p>\n            <p style=\"margin: 0cm 0cm 0pt; line-height: normal;\" class=\"MsoNormal\"><span style=\"font-size: 10pt; color: green; font-family: &quot;Courier New&quot;;\">\/* Tablo verilerini tutacak ge&ccedil;ici tablo yaratilir *\/<\/span><\/p>\n            <p style=\"margin: 0cm 0cm 0pt; line-height: normal;\" class=\"MsoNormal\"><span style=\"font-size: 10pt; color: blue; font-family: &quot;Courier New&quot;;\">CREATE<\/span><span style=\"font-size: 10pt; font-family: &quot;Courier New&quot;;\"> <span style=\"color: blue;\">TABLE<\/span> #TabloBilgileri<span style=\"color: blue;\"> <\/span><span style=\"color: gray;\">(<\/span>[Tablo Adi] <span style=\"color: blue;\">varchar<\/span><span style=\"color: gray;\">(<\/span>128<span style=\"color: gray;\">),<\/span> [Satir Sayisi] <span style=\"color: blue;\">varchar<\/span><span style=\"color: gray;\">(<\/span>11<span style=\"color: gray;\">),<\/span> [Toplam Alan] <span style=\"color: blue;\">varchar<\/span><span style=\"color: gray;\">(<\/span>18<span style=\"color: gray;\">),<\/span> [Veri Alani] <span style=\"color: blue;\">varchar<\/span><span style=\"color: gray;\">(<\/span>18<span style=\"color: gray;\">),<\/span> [Index Alani] <span style=\"color: blue;\">varchar<\/span><span style=\"color: gray;\">(<\/span>18<span style=\"color: gray;\">),<\/span> [Kullanilmayan Alan] <span style=\"color: blue;\">varchar<\/span><span style=\"color: gray;\">(<\/span>18<span style=\"color: gray;\">))<\/span><\/span><\/p>\n            <p style=\"margin: 0cm 0cm 0pt; line-height: normal;\" class=\"MsoNormal\"><span style=\"font-size: 10pt; color: gray; font-family: &quot;Courier New&quot;;\">&nbsp;<\/span><\/p>\n            <p style=\"margin: 0cm 0cm 0pt -21.3pt; line-height: normal;\" class=\"MsoNormal\"><span style=\"font-size: 10pt; color: blue; font-family: &quot;Courier New&quot;;\">GO<\/span><\/p>\n            <p style=\"margin: 0cm 0cm 0pt; line-height: normal;\" class=\"MsoNormal\"><span style=\"font-size: 10pt; color: blue; font-family: &quot;Courier New&quot;;\">&nbsp;<\/span><\/p>\n            <p style=\"margin: 0cm 0cm 0pt; line-height: normal;\" class=\"MsoNormal\"><span style=\"font-size: 10pt; color: green; font-family: &quot;Courier New&quot;;\">\/* Her tablo i&ccedil;in &ldquo;exec sp_spaceused&rdquo; komutu &ccedil;ali&thorn;tirilir *\/<\/span><\/p>\n            <p style=\"margin: 0cm 0cm 0pt; line-height: normal;\" class=\"MsoNormal\"><span style=\"font-size: 10pt; color: blue; font-family: &quot;Courier New&quot;;\">DECLARE<\/span><span style=\"font-size: 10pt; font-family: &quot;Courier New&quot;;\"> @sayac <span style=\"color: blue;\">int<\/span><\/span><\/p>\n            <p style=\"margin: 0cm 0cm 0pt; line-height: normal;\" class=\"MsoNormal\"><span style=\"font-size: 10pt; color: blue; font-family: &quot;Courier New&quot;;\">DECLARE<\/span><span style=\"font-size: 10pt; font-family: &quot;Courier New&quot;;\"> @tablosayisi <span style=\"color: blue;\">int<\/span><\/span><\/p>\n            <p style=\"margin: 0cm 0cm 0pt; line-height: normal;\" class=\"MsoNormal\"><span style=\"font-size: 10pt; color: blue; font-family: &quot;Courier New&quot;;\">DECLARE<\/span><span style=\"font-size: 10pt; font-family: &quot;Courier New&quot;;\"> @sql <span style=\"color: blue;\">varchar<\/span><span style=\"color: gray;\">(<\/span><span style=\"color: fuchsia;\">MAX<\/span><span style=\"color: gray;\">)<\/span><\/span><\/p>\n            <p style=\"margin: 0cm 0cm 0pt; line-height: normal;\" class=\"MsoNormal\"><span style=\"font-size: 10pt; color: blue; font-family: &quot;Courier New&quot;;\">SET<\/span><span style=\"font-size: 10pt; font-family: &quot;Courier New&quot;;\"> @tablosayisi <span style=\"color: gray;\">=<\/span><span style=\"color: blue;\"> <\/span><span style=\"color: gray;\">(<\/span><span style=\"color: blue;\">SELECT<\/span> <span style=\"color: fuchsia;\">MAX<\/span><span style=\"color: gray;\">(<\/span>TABLE_NO<span style=\"color: gray;\">)<\/span> <span style=\"color: blue;\">FROM<\/span> #Tablo<span style=\"color: gray;\">)<\/span><\/span><\/p>\n            <p style=\"margin: 0cm 0cm 0pt; line-height: normal;\" class=\"MsoNormal\"><span style=\"font-size: 10pt; color: blue; font-family: &quot;Courier New&quot;;\">SET<\/span><span style=\"font-size: 10pt; font-family: &quot;Courier New&quot;;\"> @sayac <span style=\"color: gray;\">=<\/span> 0<\/span><\/p>\n            <p style=\"margin: 0cm 0cm 0pt; line-height: normal;\" class=\"MsoNormal\"><span style=\"font-size: 10pt; color: blue; font-family: &quot;Courier New&quot;;\">WHILE<\/span><span style=\"font-size: 10pt; font-family: &quot;Courier New&quot;;\"> @sayac <span style=\"color: gray;\">&lt;<\/span> @tablosayisi<\/span><\/p>\n            <p style=\"margin: 0cm 0cm 0pt 23pt; line-height: normal;\" class=\"MsoNormal\"><span style=\"font-size: 10pt; color: blue; font-family: &quot;Courier New&quot;;\">BEGIN<\/span><\/p>\n            <p style=\"margin: 0cm 0cm 0pt; line-height: normal;\" class=\"MsoNormal\"><span style=\"font-size: 10pt; color: blue; font-family: &quot;Courier New&quot;;\">SET<\/span><span style=\"font-size: 10pt; font-family: &quot;Courier New&quot;;\"> @sayac <span style=\"color: gray;\">=<\/span> @sayac <span style=\"color: gray;\">+<\/span> 1<\/span><\/p>\n            <p style=\"margin: 0cm 0cm 0pt; line-height: normal;\" class=\"MsoNormal\"><span style=\"font-size: 10pt; color: blue; font-family: &quot;Courier New&quot;;\">SET<\/span><span style=\"font-size: 10pt; font-family: &quot;Courier New&quot;;\"> @sql <span style=\"color: gray;\">=<\/span> <span style=\"color: red;\">&#8216;insert into #TabloBilgileri exec sp_spaceused &quot;&#8217;<\/span> <span style=\"color: gray;\">+<\/span><span style=\"color: blue;\"> <\/span><span style=\"color: gray;\">(<\/span><span style=\"color: blue;\">SELECT<\/span> TABLE_SCHEMA <span style=\"color: blue;\">FROM<\/span> #Tablo <span style=\"color: blue;\">WHERE<\/span> @sayac <span style=\"color: gray;\">=<\/span> TABLE_NO<span style=\"color: gray;\">)<\/span> <span style=\"color: gray;\">+<\/span> <span style=\"color: red;\">&#8216;.[&#8216;<\/span> <span style=\"color: gray;\">+<\/span><span style=\"color: blue;\"> <\/span><span style=\"color: gray;\">(<\/span><span style=\"color: blue;\">SELECT<\/span> TABLE_NAME <span style=\"color: blue;\">FROM<\/span> #Tablo <span style=\"color: blue;\">WHERE<\/span> @sayac <span style=\"color: gray;\">=<\/span> TABLE_NO<span style=\"color: gray;\">)<\/span> <span style=\"color: gray;\">+<\/span> <span style=\"color: red;\">&#8216;]&quot;&#8217;<\/span><\/span><\/p>\n            <p style=\"margin: 0cm 0cm 0pt; line-height: normal;\" class=\"MsoNormal\"><span style=\"font-size: 10pt; color: blue; font-family: &quot;Courier New&quot;;\">EXEC<\/span><span style=\"font-size: 10pt; color: gray; font-family: &quot;Courier New&quot;;\">(<\/span><span style=\"font-size: 10pt; font-family: &quot;Courier New&quot;;\">@sql<span style=\"color: gray;\">)<\/span><\/span><\/p>\n            <p style=\"margin: 0cm 0cm 0pt; line-height: normal;\" class=\"MsoNormal\"><span style=\"font-size: 10pt; color: blue; font-family: &quot;Courier New&quot;;\">END<\/span><\/p>\n            <p style=\"margin: 0cm 0cm 0pt; line-height: normal;\" class=\"MsoNormal\"><span style=\"font-size: 10pt; color: blue; font-family: &quot;Courier New&quot;;\">&nbsp;<\/span><\/p>\n            <p style=\"margin: 0cm 0cm 0pt; line-height: normal;\" class=\"MsoNormal\"><span style=\"font-size: 10pt; color: green; font-family: &quot;Courier New&quot;;\">\/* KB cinsinden g&ouml;sterilen tablo boyutlari MB ve GB boyutlarinda g&ouml;sterilir *\/<\/span><\/p>\n            <p style=\"margin: 0cm 0cm 0pt; line-height: normal;\" class=\"MsoNormal\"><span style=\"font-size: 10pt; color: blue; font-family: &quot;Courier New&quot;;\">SELECT<\/span><span style=\"font-size: 10pt; font-family: &quot;Courier New&quot;;\"> [Tablo Adi]<span style=\"color: gray;\">,<\/span> [Satir Sayisi]<span style=\"color: gray;\">,<\/span><span style=\"color: blue;\"> <\/span><span style=\"color: gray;\">(<\/span><span style=\"color: blue;\">CASE<\/span> <\/span><\/p>\n            <p style=\"margin: 0cm 0cm 0pt; line-height: normal;\" class=\"MsoNormal\"><span style=\"font-size: 10pt; color: blue; font-family: &quot;Courier New&quot;;\">WHEN<\/span><span style=\"font-size: 10pt; font-family: &quot;Courier New&quot;;\"> <span style=\"color: fuchsia;\">CONVERT<\/span><span style=\"color: gray;\">(<\/span><span style=\"color: blue;\">varchar<\/span><span style=\"color: gray;\">(<\/span>50<span style=\"color: gray;\">),<\/span><span style=\"color: fuchsia;\">CONVERT<\/span><span style=\"color: gray;\">(<\/span><span style=\"color: blue;\">bigint<\/span><span style=\"color: gray;\">,LEFT(<\/span>[Toplam Alan]<span style=\"color: gray;\">,<\/span><span style=\"color: fuchsia;\">LEN<\/span><span style=\"color: gray;\">(<\/span>[Toplam Alan]<span style=\"color: gray;\">)-<\/span>3<span style=\"color: gray;\">))\/<\/span>1024<span style=\"color: gray;\">)<\/span> <span style=\"color: gray;\">&lt;<\/span> 1024<span style=\"\">&nbsp; <\/span><span style=\"color: blue;\">THEN<\/span> <span style=\"color: fuchsia;\">CONVERT<\/span><span style=\"color: gray;\">(<\/span><span style=\"color: blue;\">varchar<\/span><span style=\"color: gray;\">(<\/span>50<span style=\"color: gray;\">),<\/span><span style=\"color: fuchsia;\">CONVERT<\/span><span style=\"color: gray;\">(<\/span><span style=\"color: blue;\">bigint<\/span><span style=\"color: gray;\">,LEFT(<\/span>[Toplam Alan]<span style=\"color: gray;\">,<\/span><span style=\"color: fuchsia;\">LEN<\/span><span style=\"color: gray;\">(<\/span>[Toplam Alan]<span style=\"color: gray;\">)-<\/span>3<span style=\"color: gray;\">))\/<\/span>1024<span style=\"color: gray;\">)<\/span> <span style=\"color: gray;\">+<\/span> <span style=\"color: red;\">&#8216; MB&#8217;<\/span><\/span><\/p>\n            <p style=\"margin: 0cm 0cm 0pt; line-height: normal;\" class=\"MsoNormal\"><span style=\"font-size: 10pt; color: blue; font-family: &quot;Courier New&quot;;\">ELSE<\/span><span style=\"font-size: 10pt; font-family: &quot;Courier New&quot;;\"> <span style=\"color: fuchsia;\">CONVERT<\/span><span style=\"color: gray;\">(<\/span><span style=\"color: blue;\">varchar<\/span><span style=\"color: gray;\">(<\/span>50<span style=\"color: gray;\">),<\/span><span style=\"color: fuchsia;\">CONVERT<\/span><span style=\"color: gray;\">(<\/span><span style=\"color: blue;\">decimal<\/span><span style=\"color: gray;\">(<\/span>10<span style=\"color: gray;\">,<\/span>2<span style=\"color: gray;\">),<\/span><span style=\"color: fuchsia;\">CONVERT<\/span><span style=\"color: gray;\">(<\/span><span style=\"color: blue;\">decimal<\/span><span style=\"color: gray;\">,LEFT(<\/span>[Toplam Alan]<span style=\"color: gray;\">,<\/span><span style=\"color: fuchsia;\">LEN<\/span><span style=\"color: gray;\">(<\/span>[Toplam Alan]<span style=\"color: gray;\">)-<\/span>3<span style=\"color: gray;\">))\/<\/span>1024<span style=\"color: gray;\">\/<\/span>1024<span style=\"color: gray;\">))<\/span> <span style=\"color: gray;\">+<\/span> <span style=\"color: red;\">&#8216; GB&#8217;<\/span> <span style=\"color: blue;\">END<\/span><span style=\"color: gray;\">)<\/span> <span style=\"color: blue;\">AS<\/span> [Toplam Alan]<\/span><\/p>\n            <p style=\"margin: 0cm 0cm 0pt; line-height: normal;\" class=\"MsoNormal\"><span style=\"font-size: 10pt; color: gray; font-family: &quot;Courier New&quot;;\">,(<\/span><span style=\"font-size: 10pt; color: blue; font-family: &quot;Courier New&quot;;\">CASE<\/span><span style=\"font-size: 10pt; font-family: &quot;Courier New&quot;;\"> <\/span><\/p>\n            <p style=\"margin: 0cm 0cm 0pt; line-height: normal;\" class=\"MsoNormal\"><span style=\"font-size: 10pt; color: blue; font-family: &quot;Courier New&quot;;\">WHEN<\/span><span style=\"font-size: 10pt; font-family: &quot;Courier New&quot;;\"> <span style=\"color: fuchsia;\">CONVERT<\/span><span style=\"color: gray;\">(<\/span><span style=\"color: blue;\">varchar<\/span><span style=\"color: gray;\">(<\/span>50<span style=\"color: gray;\">),<\/span><span style=\"color: fuchsia;\">CONVERT<\/span><span style=\"color: gray;\">(<\/span><span style=\"color: blue;\">bigint<\/span><span style=\"color: gray;\">,LEFT(<\/span>[Veri Alani]<span style=\"color: gray;\">,<\/span><span style=\"color: fuchsia;\">LEN<\/span><span style=\"color: gray;\">(<\/span>[Veri Alani]<span style=\"color: gray;\">)-<\/span>3<span style=\"color: gray;\">))\/<\/span>1024<span style=\"color: gray;\">)<\/span> <span style=\"color: gray;\">&lt;<\/span> 1024 <span style=\"color: blue;\">THEN<\/span> <span style=\"color: fuchsia;\">CONVERT<\/span><span style=\"color: gray;\">(<\/span><span style=\"color: blue;\">varchar<\/span><span style=\"color: gray;\">(<\/span>50<span style=\"color: gray;\">),<\/span><span style=\"color: fuchsia;\">CONVERT<\/span><span style=\"color: gray;\">(<\/span><span style=\"color: blue;\">bigint<\/span><span style=\"color: gray;\">,LEFT(<\/span>[Veri Alani]<span style=\"color: gray;\">,<\/span><span style=\"color: fuchsia;\">LEN<\/span><span style=\"color: gray;\">(<\/span>[Veri Alani]<span style=\"color: gray;\">)-<\/span>3<span style=\"color: gray;\">))\/<\/span>1024<span style=\"color: gray;\">)<\/span> <span style=\"color: gray;\">+<\/span> <span style=\"color: red;\">&#8216; MB&#8217;<\/span><\/span><\/p>\n            <p style=\"margin: 0cm 0cm 0pt; line-height: normal;\" class=\"MsoNormal\"><span style=\"font-size: 10pt; color: blue; font-family: &quot;Courier New&quot;;\">ELSE<\/span><span style=\"font-size: 10pt; font-family: &quot;Courier New&quot;;\"> <span style=\"color: fuchsia;\">CONVERT<\/span><span style=\"color: gray;\">(<\/span><span style=\"color: blue;\">varchar<\/span><span style=\"color: gray;\">(<\/span>50<span style=\"color: gray;\">),<\/span><span style=\"color: fuchsia;\">CONVERT<\/span><span style=\"color: gray;\">(<\/span><span style=\"color: blue;\">decimal<\/span><span style=\"color: gray;\">(<\/span>10<span style=\"color: gray;\">,<\/span>2<span style=\"color: gray;\">),<\/span><span style=\"color: fuchsia;\">CONVERT<\/span><span style=\"color: gray;\">(<\/span><span style=\"color: blue;\">decimal<\/span><span style=\"color: gray;\">,LEFT(<\/span>[Veri Alani]<span style=\"color: gray;\">,<\/span><span style=\"color: fuchsia;\">LEN<\/span><span style=\"color: gray;\">(<\/span>[Veri Alani]<span style=\"color: gray;\">)-<\/span>3<span style=\"color: gray;\">))\/<\/span>1024<span style=\"color: gray;\">\/<\/span>1024<span style=\"color: gray;\">))<\/span> <span style=\"color: gray;\">+<\/span> <span style=\"color: red;\">&#8216; GB&#8217;<\/span> <span style=\"color: blue;\">END<\/span><span style=\"color: gray;\">)<\/span> <span style=\"color: blue;\">AS<\/span> [Veri Alani]<\/span><\/p>\n            <p style=\"margin: 0cm 0cm 0pt; line-height: normal;\" class=\"MsoNormal\"><span style=\"font-size: 10pt; color: gray; font-family: &quot;Courier New&quot;;\">,(<\/span><span style=\"font-size: 10pt; color: blue; font-family: &quot;Courier New&quot;;\">CASE<\/span><span style=\"font-size: 10pt; font-family: &quot;Courier New&quot;;\"> <\/span><\/p>\n            <p style=\"margin: 0cm 0cm 0pt; line-height: normal;\" class=\"MsoNormal\"><span style=\"font-size: 10pt; color: blue; font-family: &quot;Courier New&quot;;\">WHEN<\/span><span style=\"font-size: 10pt; font-family: &quot;Courier New&quot;;\"> <span style=\"color: fuchsia;\">CONVERT<\/span><span style=\"color: gray;\">(<\/span><span style=\"color: blue;\">varchar<\/span><span style=\"color: gray;\">(<\/span>50<span style=\"color: gray;\">),<\/span><span style=\"color: fuchsia;\">CONVERT<\/span><span style=\"color: gray;\">(<\/span><span style=\"color: blue;\">bigint<\/span><span style=\"color: gray;\">,LEFT(<\/span>[Index Alani]<span style=\"color: gray;\">,<\/span><span style=\"color: fuchsia;\">LEN<\/span><span style=\"color: gray;\">(<\/span>[Index Alani]<span style=\"color: gray;\">)-<\/span>3<span style=\"color: gray;\">))\/<\/span>1024<span style=\"color: gray;\">)<\/span> <span style=\"color: gray;\">&lt;<\/span> 1024<span style=\"\">&nbsp; <\/span><span style=\"color: blue;\">THEN<\/span> <span style=\"color: fuchsia;\">CONVERT<\/span><span style=\"color: gray;\">(<\/span><span style=\"color: blue;\">varchar<\/span><span style=\"color: gray;\">(<\/span>50<span style=\"color: gray;\">),<\/span><span style=\"color: fuchsia;\">CONVERT<\/span><span style=\"color: gray;\">(<\/span><span style=\"color: blue;\">bigint<\/span><span style=\"color: gray;\">,LEFT(<\/span>[Index Alani]<span style=\"color: gray;\">,<\/span><span style=\"color: fuchsia;\">LEN<\/span><span style=\"color: gray;\">(<\/span>[Index Alani]<span style=\"color: gray;\">)-<\/span>3<span style=\"color: gray;\">))\/<\/span>1024<span style=\"color: gray;\">)<\/span> <span style=\"color: gray;\">+<\/span> <span style=\"color: red;\">&#8216; MB&#8217;<\/span><\/span><\/p>\n            <p style=\"margin: 0cm 0cm 0pt; line-height: normal;\" class=\"MsoNormal\"><span style=\"font-size: 10pt; color: blue; font-family: &quot;Courier New&quot;;\">ELSE<\/span><span style=\"font-size: 10pt; font-family: &quot;Courier New&quot;;\"> <span style=\"color: fuchsia;\">CONVERT<\/span><span style=\"color: gray;\">(<\/span><span style=\"color: blue;\">varchar<\/span><span style=\"color: gray;\">(<\/span>50<span style=\"color: gray;\">),<\/span><span style=\"color: fuchsia;\">CONVERT<\/span><span style=\"color: gray;\">(<\/span><span style=\"color: blue;\">decimal<\/span><span style=\"color: gray;\">(<\/span>10<span style=\"color: gray;\">,<\/span>2<span style=\"color: gray;\">),<\/span><span style=\"color: fuchsia;\">CONVERT<\/span><span style=\"color: gray;\">(<\/span><span style=\"color: blue;\">decimal<\/span><span style=\"color: gray;\">,LEFT(<\/span>[Index Alani]<span style=\"color: gray;\">,<\/span><span style=\"color: fuchsia;\">LEN<\/span><span style=\"color: gray;\">(<\/span>[Index Alani]<span style=\"color: gray;\">)-<\/span>3<span style=\"color: gray;\">))\/<\/span>1024<span style=\"color: gray;\">\/<\/span>1024<span style=\"color: gray;\">))<\/span> <span style=\"color: gray;\">+<\/span> <span style=\"color: red;\">&#8216; GB&#8217;<\/span> <span style=\"color: blue;\">END<\/span><span style=\"color: gray;\">)<\/span> <span style=\"color: blue;\">AS<\/span> [Index Alani]<\/span><\/p>\n            <p style=\"margin: 0cm 0cm 0pt; line-height: normal;\" class=\"MsoNormal\"><span style=\"font-size: 10pt; color: blue; font-family: &quot;Courier New&quot;;\">FROM<\/span><span style=\"font-size: 10pt; font-family: &quot;Courier New&quot;;\"> #TabloBilgileri tb<\/span><\/p>\n            <p style=\"margin: 0cm 0cm 0pt; line-height: normal;\" class=\"MsoNormal\"><span style=\"font-size: 10pt; font-family: &quot;Courier New&quot;;\">&nbsp;<\/span><\/p>\n            <p style=\"margin: 0cm 0cm 0pt; line-height: normal;\" class=\"MsoNormal\"><span style=\"font-size: 10pt; color: green; font-family: &quot;Courier New&quot;;\">\/* Ge&ccedil;ici tablolar silinir *\/<\/span><\/p>\n            <p style=\"margin: 0cm 0cm 0pt; line-height: normal;\" class=\"MsoNormal\"><span style=\"font-size: 10pt; color: green; font-family: &quot;Courier New&quot;;\">&nbsp;<\/span><\/p>\n            <p style=\"margin: 0cm 0cm 0pt; line-height: normal;\" class=\"MsoNormal\"><span style=\"font-size: 10pt; color: blue; font-family: &quot;Courier New&quot;;\">DROP<\/span><span style=\"font-size: 10pt; font-family: &quot;Courier New&quot;;\"> <span style=\"color: blue;\">TABLE<\/span> #Tablo <\/span><\/p>\n            <p style=\"margin: 0cm 0cm 0pt; line-height: normal;\" class=\"MsoNormal\"><span style=\"font-size: 10pt; color: blue; font-family: &quot;Courier New&quot;;\">DROP<\/span><span style=\"font-size: 10pt; font-family: &quot;Courier New&quot;;\"> <span style=\"color: blue;\">TABLE<\/span> #TabloBilgileri<\/span><\/p>\n            <\/td>\n        <\/tr>\n    <\/tbody>\n<\/table>\n<\/span><\/p>\n<p style=\"margin: 0cm 0cm 10pt;\" class=\"MsoNormal\">&nbsp;&nbsp;<\/p>\n<p>&nbsp;<\/p>","protected":false},"excerpt":{"rendered":"<p>Bir SQL Server veritabaniniz mi var. Veritabanindaki tablolarin boyutlarini ve satir sayilarini mi &#246;grenmeniz gerekiyor. O zaman asagidaki T-SQL kodu &#231;alistirin, zaman kazanin.<\/p>\n","protected":false},"author":552,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[422],"tags":[5584,4955,5299,5990,5822,4219,4559],"_links":{"self":[{"href":"https:\/\/www.yazilimmutfagi.com\/index.php\/wp-json\/wp\/v2\/posts\/254"}],"collection":[{"href":"https:\/\/www.yazilimmutfagi.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.yazilimmutfagi.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.yazilimmutfagi.com\/index.php\/wp-json\/wp\/v2\/users\/552"}],"replies":[{"embeddable":true,"href":"https:\/\/www.yazilimmutfagi.com\/index.php\/wp-json\/wp\/v2\/comments?post=254"}],"version-history":[{"count":0,"href":"https:\/\/www.yazilimmutfagi.com\/index.php\/wp-json\/wp\/v2\/posts\/254\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.yazilimmutfagi.com\/index.php\/wp-json\/wp\/v2\/media?parent=254"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.yazilimmutfagi.com\/index.php\/wp-json\/wp\/v2\/categories?post=254"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.yazilimmutfagi.com\/index.php\/wp-json\/wp\/v2\/tags?post=254"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}