From 3c9091681d58c3bdb4c819c93226e66279847042 Mon Sep 17 00:00:00 2001 From: Munyoki Kilyungi Date: Tue, 8 Aug 2023 11:49:13 +0300 Subject: Add new document for doc'ing SQL tricks Signed-off-by: Munyoki Kilyungi --- topics/next-gen-databases/ontology.gmi | 1 + topics/next-gen-databases/sql-tricks.gmi | 11 +++++++++++ 2 files changed, 12 insertions(+) create mode 100644 topics/next-gen-databases/sql-tricks.gmi diff --git a/topics/next-gen-databases/ontology.gmi b/topics/next-gen-databases/ontology.gmi index a028dbc..35a87bf 100644 --- a/topics/next-gen-databases/ontology.gmi +++ b/topics/next-gen-databases/ontology.gmi @@ -9,6 +9,7 @@ Here, we note down all lessons learnt while we continuously improve our ontologi => https://www.w3.org/wiki/VocabularyMarket Vocabulary Market => https://www.w3.org/TR/prov-o/ PROV-O: The PROV Ontology => https://bioportal.bioontology.org/ontologies Browse Ontologies related to biology + ### rdfs:label Consider this pattern when dumping data in rdf: 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"; +``` -- cgit v1.2.3