summaryrefslogtreecommitdiff
path: root/topics/next-gen-databases/sql-tricks.gmi
diff options
context:
space:
mode:
authorMunyoki Kilyungi2023-08-08 11:49:13 +0300
committerMunyoki Kilyungi2023-08-08 11:49:13 +0300
commit3c9091681d58c3bdb4c819c93226e66279847042 (patch)
tree07bc4839b8299ea359c01e12d83a91b7ee7df2fd /topics/next-gen-databases/sql-tricks.gmi
parent2df4b7e17e33a7a8165a584988ddf7551c7ae4b9 (diff)
downloadgn-gemtext-3c9091681d58c3bdb4c819c93226e66279847042.tar.gz
Add new document for doc'ing SQL tricks
Signed-off-by: Munyoki Kilyungi <me@bonfacemunyoki.com>
Diffstat (limited to 'topics/next-gen-databases/sql-tricks.gmi')
-rw-r--r--topics/next-gen-databases/sql-tricks.gmi11
1 files changed, 11 insertions, 0 deletions
diff --git a/topics/next-gen-databases/sql-tricks.gmi b/topics/next-gen-databases/sql-tricks.gmi
new file mode 100644
index 0000000..97c492f
--- /dev/null
+++ b/topics/next-gen-databases/sql-tricks.gmi
@@ -0,0 +1,11 @@
+# This document has some useful SQL tricks
+
+* Check the character set/collation a given table uses:
+
+```
+SELECT CCSA.* FROM information_schema.`TABLES` T,
+ information_schema.`COLLATION_CHARACTER_SET_APPLICABILITY` CCSA
+WHERE CCSA.collation_name = T.table_collation
+ AND T.table_schema = "db_webqtl"
+ AND T.table_name = "Investigators";
+```