Difference between revisions of "SQL"
From Alessandro's Wiki
Porcelinux (talk | contribs) |
|||
(One intermediate revision by one other user not shown) | |||
Line 1: | Line 1: | ||
[[Category:Programming-Languages]] | |||
''this is pure code notes, check out [[mysql]] also | ''this is pure code notes, check out [[mysql]] also | ||
= statements = | |||
* get Database size in kilobytes: | * get Database size in kilobytes: | ||
SELECT sum( data_length + index_length ) / 1024) 'DB Size in MB' FROM information_schema.TABLES WHERE TABLES.TABLE_SCHEMA='<database name>' GROUP BY table_schema | SELECT sum( data_length + index_length ) / 1024) 'DB Size in MB' FROM information_schema.TABLES WHERE TABLES.TABLE_SCHEMA='<database name>' GROUP BY table_schema | ||
== errors | == convert an INT field to BIN == | ||
SELECT CONV( int_field, 10, 2) FROM table; | |||
= errors = | |||
* SQL Error '''10060''' : | * SQL Error '''10060''' : | ||
** port filtered | ** port filtered |
Latest revision as of 22:10, 10 February 2022
this is pure code notes, check out mysql also
statements
- get Database size in kilobytes:
SELECT sum( data_length + index_length ) / 1024) 'DB Size in MB' FROM information_schema.TABLES WHERE TABLES.TABLE_SCHEMA='<database name>' GROUP BY table_schema
convert an INT field to BIN
SELECT CONV( int_field, 10, 2) FROM table;
errors
- SQL Error 10060 :
- port filtered