├── .env.example ├── .gitignore ├── Chat_with_SQL_Database.ipynb ├── README.md └── students.sql /.env.example: -------------------------------------------------------------------------------- 1 | OPENAI_API_KEY=sk-ABCDEF1234567890 -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .env -------------------------------------------------------------------------------- /Chat_with_SQL_Database.ipynb: -------------------------------------------------------------------------------- 1 | { 2 | "cells": [ 3 | { 4 | "cell_type": "markdown", 5 | "metadata": { 6 | "colab_type": "text", 7 | "id": "view-in-github" 8 | }, 9 | "source": [ 10 | "\"Open" 11 | ] 12 | }, 13 | { 14 | "cell_type": "code", 15 | "execution_count": 39, 16 | "metadata": { 17 | "colab": { 18 | "base_uri": "https://localhost:8080/" 19 | }, 20 | "id": "4HHQlehr2szs", 21 | "outputId": "c775de95-54ba-4b2d-dc19-23e4866c56c1" 22 | }, 23 | "outputs": [ 24 | { 25 | "name": "stdout", 26 | "output_type": "stream", 27 | "text": [ 28 | "Requirement already satisfied: langchain in /Users/wyang14/.pyenv/versions/3.9.16/lib/python3.9/site-packages (0.0.139)\n", 29 | "Requirement already satisfied: async-timeout<5.0.0,>=4.0.0 in /Users/wyang14/.pyenv/versions/3.9.16/lib/python3.9/site-packages (from langchain) (4.0.2)\n", 30 | "Requirement already satisfied: PyYAML>=5.4.1 in /Users/wyang14/.pyenv/versions/3.9.16/lib/python3.9/site-packages (from langchain) (5.4.1)\n", 31 | "Requirement already satisfied: requests<3,>=2 in /Users/wyang14/.pyenv/versions/3.9.16/lib/python3.9/site-packages (from langchain) (2.28.2)\n", 32 | "Requirement already satisfied: numpy<2,>=1 in /Users/wyang14/.pyenv/versions/3.9.16/lib/python3.9/site-packages (from langchain) (1.23.5)\n", 33 | "Requirement already satisfied: aiohttp<4.0.0,>=3.8.3 in /Users/wyang14/.pyenv/versions/3.9.16/lib/python3.9/site-packages (from langchain) (3.8.4)\n", 34 | "Requirement already satisfied: openapi-schema-pydantic<2.0,>=1.2 in /Users/wyang14/.pyenv/versions/3.9.16/lib/python3.9/site-packages (from langchain) (1.2.4)\n", 35 | "Requirement already satisfied: dataclasses-json<0.6.0,>=0.5.7 in /Users/wyang14/.pyenv/versions/3.9.16/lib/python3.9/site-packages (from langchain) (0.5.7)\n", 36 | "Requirement already satisfied: tenacity<9.0.0,>=8.1.0 in /Users/wyang14/.pyenv/versions/3.9.16/lib/python3.9/site-packages (from langchain) (8.2.2)\n", 37 | "Requirement already satisfied: gptcache>=0.1.7 in /Users/wyang14/.pyenv/versions/3.9.16/lib/python3.9/site-packages (from langchain) (0.1.10)\n", 38 | "Requirement already satisfied: pydantic<2,>=1 in /Users/wyang14/.pyenv/versions/3.9.16/lib/python3.9/site-packages (from langchain) (1.10.7)\n", 39 | "Requirement already satisfied: SQLAlchemy<2,>=1 in /Users/wyang14/.pyenv/versions/3.9.16/lib/python3.9/site-packages (from langchain) (1.4.47)\n", 40 | "Requirement already satisfied: frozenlist>=1.1.1 in /Users/wyang14/.pyenv/versions/3.9.16/lib/python3.9/site-packages (from aiohttp<4.0.0,>=3.8.3->langchain) (1.3.3)\n", 41 | "Requirement already satisfied: multidict<7.0,>=4.5 in /Users/wyang14/.pyenv/versions/3.9.16/lib/python3.9/site-packages (from aiohttp<4.0.0,>=3.8.3->langchain) (6.0.4)\n", 42 | "Requirement already satisfied: charset-normalizer<4.0,>=2.0 in /Users/wyang14/.pyenv/versions/3.9.16/lib/python3.9/site-packages (from aiohttp<4.0.0,>=3.8.3->langchain) (3.1.0)\n", 43 | "Requirement already satisfied: attrs>=17.3.0 in /Users/wyang14/.pyenv/versions/3.9.16/lib/python3.9/site-packages (from aiohttp<4.0.0,>=3.8.3->langchain) (22.2.0)\n", 44 | "Requirement already satisfied: aiosignal>=1.1.2 in /Users/wyang14/.pyenv/versions/3.9.16/lib/python3.9/site-packages (from aiohttp<4.0.0,>=3.8.3->langchain) (1.3.1)\n", 45 | "Requirement already satisfied: yarl<2.0,>=1.0 in /Users/wyang14/.pyenv/versions/3.9.16/lib/python3.9/site-packages (from aiohttp<4.0.0,>=3.8.3->langchain) (1.8.2)\n", 46 | "Requirement already satisfied: marshmallow<4.0.0,>=3.3.0 in /Users/wyang14/.pyenv/versions/3.9.16/lib/python3.9/site-packages (from dataclasses-json<0.6.0,>=0.5.7->langchain) (3.19.0)\n", 47 | "Requirement already satisfied: typing-inspect>=0.4.0 in /Users/wyang14/.pyenv/versions/3.9.16/lib/python3.9/site-packages (from dataclasses-json<0.6.0,>=0.5.7->langchain) (0.8.0)\n", 48 | "Requirement already satisfied: marshmallow-enum<2.0.0,>=1.5.1 in /Users/wyang14/.pyenv/versions/3.9.16/lib/python3.9/site-packages (from dataclasses-json<0.6.0,>=0.5.7->langchain) (1.5.1)\n", 49 | "Requirement already satisfied: cachetools in /Users/wyang14/.pyenv/versions/3.9.16/lib/python3.9/site-packages (from gptcache>=0.1.7->langchain) (5.3.0)\n", 50 | "Requirement already satisfied: openai in /Users/wyang14/.pyenv/versions/3.9.16/lib/python3.9/site-packages (from gptcache>=0.1.7->langchain) (0.27.4)\n", 51 | "Requirement already satisfied: typing-extensions>=4.2.0 in /Users/wyang14/.pyenv/versions/3.9.16/lib/python3.9/site-packages (from pydantic<2,>=1->langchain) (4.5.0)\n", 52 | "Requirement already satisfied: idna<4,>=2.5 in /Users/wyang14/.pyenv/versions/3.9.16/lib/python3.9/site-packages (from requests<3,>=2->langchain) (3.4)\n", 53 | "Requirement already satisfied: urllib3<1.27,>=1.21.1 in /Users/wyang14/.pyenv/versions/3.9.16/lib/python3.9/site-packages (from requests<3,>=2->langchain) (1.26.15)\n", 54 | "Requirement already satisfied: certifi>=2017.4.17 in /Users/wyang14/.pyenv/versions/3.9.16/lib/python3.9/site-packages (from requests<3,>=2->langchain) (2022.12.7)\n", 55 | "Requirement already satisfied: greenlet!=0.4.17 in /Users/wyang14/.pyenv/versions/3.9.16/lib/python3.9/site-packages (from SQLAlchemy<2,>=1->langchain) (2.0.2)\n", 56 | "Requirement already satisfied: packaging>=17.0 in /Users/wyang14/.pyenv/versions/3.9.16/lib/python3.9/site-packages (from marshmallow<4.0.0,>=3.3.0->dataclasses-json<0.6.0,>=0.5.7->langchain) (23.0)\n", 57 | "Requirement already satisfied: mypy-extensions>=0.3.0 in /Users/wyang14/.pyenv/versions/3.9.16/lib/python3.9/site-packages (from typing-inspect>=0.4.0->dataclasses-json<0.6.0,>=0.5.7->langchain) (1.0.0)\n", 58 | "Requirement already satisfied: tqdm in /Users/wyang14/.pyenv/versions/3.9.16/lib/python3.9/site-packages (from openai->gptcache>=0.1.7->langchain) (4.65.0)\n", 59 | "Note: you may need to restart the kernel to use updated packages.\n", 60 | "Requirement already satisfied: pymysql in /Users/wyang14/.pyenv/versions/3.9.16/lib/python3.9/site-packages (1.0.3)\n", 61 | "Note: you may need to restart the kernel to use updated packages.\n" 62 | ] 63 | } 64 | ], 65 | "source": [ 66 | "%pip install langchain\n", 67 | "%pip install pymysql" 68 | ] 69 | }, 70 | { 71 | "cell_type": "code", 72 | "execution_count": 40, 73 | "metadata": { 74 | "colab": { 75 | "base_uri": "https://localhost:8080/" 76 | }, 77 | "id": "-B24JEue3Zwz", 78 | "outputId": "952e66fc-12e6-480d-8068-0fdfc5ed4baf" 79 | }, 80 | "outputs": [], 81 | "source": [ 82 | "from langchain import OpenAI, SQLDatabase, SQLDatabaseChain" 83 | ] 84 | }, 85 | { 86 | "cell_type": "code", 87 | "execution_count": 41, 88 | "metadata": {}, 89 | "outputs": [], 90 | "source": [ 91 | "db = SQLDatabase.from_uri(\"mysql+pymysql://root:root@127.0.0.1/students\")\n", 92 | "llm = OpenAI(temperature=0)" 93 | ] 94 | }, 95 | { 96 | "cell_type": "code", 97 | "execution_count": 42, 98 | "metadata": {}, 99 | "outputs": [], 100 | "source": [ 101 | "db_chain = SQLDatabaseChain(llm=llm, database=db, verbose=True)" 102 | ] 103 | }, 104 | { 105 | "cell_type": "code", 106 | "execution_count": 43, 107 | "metadata": {}, 108 | "outputs": [ 109 | { 110 | "name": "stdout", 111 | "output_type": "stream", 112 | "text": [ 113 | "\n", 114 | "\n", 115 | "\u001b[1m> Entering new SQLDatabaseChain chain...\u001b[0m\n", 116 | "How many students are there? \n", 117 | "SQLQuery:\u001b[32;1m\u001b[1;3m SELECT COUNT(*) FROM students;\u001b[0m\n", 118 | "SQLResult: \u001b[33;1m\u001b[1;3m[(5,)]\u001b[0m\n", 119 | "Answer:\u001b[32;1m\u001b[1;3m There are 5 students.\u001b[0m\n", 120 | "\u001b[1m> Finished chain.\u001b[0m\n" 121 | ] 122 | }, 123 | { 124 | "data": { 125 | "text/plain": [ 126 | "' There are 5 students.'" 127 | ] 128 | }, 129 | "execution_count": 43, 130 | "metadata": {}, 131 | "output_type": "execute_result" 132 | } 133 | ], 134 | "source": [ 135 | "db_chain.run(\"How many students are there?\")" 136 | ] 137 | }, 138 | { 139 | "cell_type": "code", 140 | "execution_count": 44, 141 | "metadata": {}, 142 | "outputs": [ 143 | { 144 | "name": "stdout", 145 | "output_type": "stream", 146 | "text": [ 147 | "\n", 148 | "\n", 149 | "\u001b[1m> Entering new SQLDatabaseChain chain...\u001b[0m\n", 150 | "What are the students names? \n", 151 | "SQLQuery:\u001b[32;1m\u001b[1;3m SELECT name FROM students \u001b[0m\n", 152 | "SQLResult: \u001b[33;1m\u001b[1;3m[('Alex',), ('Alice',), ('Jack',), ('Ophelia',), ('Zack',)]\u001b[0m\n", 153 | "Answer:\u001b[32;1m\u001b[1;3m The students names are Alex, Alice, Jack, Ophelia, and Zack.\u001b[0m\n", 154 | "\u001b[1m> Finished chain.\u001b[0m\n" 155 | ] 156 | }, 157 | { 158 | "data": { 159 | "text/plain": [ 160 | "' The students names are Alex, Alice, Jack, Ophelia, and Zack.'" 161 | ] 162 | }, 163 | "execution_count": 44, 164 | "metadata": {}, 165 | "output_type": "execute_result" 166 | } 167 | ], 168 | "source": [ 169 | "db_chain.run(\"What are the students names?\")" 170 | ] 171 | }, 172 | { 173 | "cell_type": "code", 174 | "execution_count": 45, 175 | "metadata": {}, 176 | "outputs": [ 177 | { 178 | "name": "stdout", 179 | "output_type": "stream", 180 | "text": [ 181 | "\n", 182 | "\n", 183 | "\u001b[1m> Entering new SQLDatabaseChain chain...\u001b[0m\n", 184 | "What's the average score of them? \n", 185 | "SQLQuery:\u001b[32;1m\u001b[1;3m SELECT AVG(score) FROM students;\u001b[0m\n", 186 | "SQLResult: \u001b[33;1m\u001b[1;3m[(Decimal('61.0000'),)]\u001b[0m\n", 187 | "Answer:\u001b[32;1m\u001b[1;3m The average score of them is 61.\u001b[0m\n", 188 | "\u001b[1m> Finished chain.\u001b[0m\n" 189 | ] 190 | }, 191 | { 192 | "data": { 193 | "text/plain": [ 194 | "' The average score of them is 61.'" 195 | ] 196 | }, 197 | "execution_count": 45, 198 | "metadata": {}, 199 | "output_type": "execute_result" 200 | } 201 | ], 202 | "source": [ 203 | "db_chain.run(\"What's the average score of them?\")" 204 | ] 205 | }, 206 | { 207 | "cell_type": "code", 208 | "execution_count": 46, 209 | "metadata": {}, 210 | "outputs": [ 211 | { 212 | "name": "stdout", 213 | "output_type": "stream", 214 | "text": [ 215 | "\n", 216 | "\n", 217 | "\u001b[1m> Entering new SQLDatabaseChain chain...\u001b[0m\n", 218 | "What's the average score of them, excluding the zero score? \n", 219 | "SQLQuery:\u001b[32;1m\u001b[1;3m SELECT AVG(score) FROM students WHERE score > 0;\u001b[0m\n", 220 | "SQLResult: \u001b[33;1m\u001b[1;3m[(Decimal('76.2500'),)]\u001b[0m\n", 221 | "Answer:\u001b[32;1m\u001b[1;3m The average score of them, excluding the zero score, is 76.25.\u001b[0m\n", 222 | "\u001b[1m> Finished chain.\u001b[0m\n" 223 | ] 224 | }, 225 | { 226 | "data": { 227 | "text/plain": [ 228 | "' The average score of them, excluding the zero score, is 76.25.'" 229 | ] 230 | }, 231 | "execution_count": 46, 232 | "metadata": {}, 233 | "output_type": "execute_result" 234 | } 235 | ], 236 | "source": [ 237 | "db_chain.run(\"What's the average score of them, excluding the zero score?\")" 238 | ] 239 | }, 240 | { 241 | "cell_type": "code", 242 | "execution_count": 47, 243 | "metadata": {}, 244 | "outputs": [ 245 | { 246 | "name": "stdout", 247 | "output_type": "stream", 248 | "text": [ 249 | "\n", 250 | "\n", 251 | "\u001b[1m> Entering new SQLDatabaseChain chain...\u001b[0m\n", 252 | "Who got zero score? \n", 253 | "SQLQuery:\u001b[32;1m\u001b[1;3m SELECT name FROM students WHERE score = 0;\u001b[0m\n", 254 | "SQLResult: \u001b[33;1m\u001b[1;3m[('Ophelia',)]\u001b[0m\n", 255 | "Answer:\u001b[32;1m\u001b[1;3m Ophelia got zero score.\u001b[0m\n", 256 | "\u001b[1m> Finished chain.\u001b[0m\n" 257 | ] 258 | }, 259 | { 260 | "data": { 261 | "text/plain": [ 262 | "' Ophelia got zero score.'" 263 | ] 264 | }, 265 | "execution_count": 47, 266 | "metadata": {}, 267 | "output_type": "execute_result" 268 | } 269 | ], 270 | "source": [ 271 | "db_chain.run(\"Who got zero score?\")" 272 | ] 273 | }, 274 | { 275 | "cell_type": "code", 276 | "execution_count": 48, 277 | "metadata": {}, 278 | "outputs": [ 279 | { 280 | "name": "stdout", 281 | "output_type": "stream", 282 | "text": [ 283 | "\n", 284 | "\n", 285 | "\u001b[1m> Entering new SQLDatabaseChain chain...\u001b[0m\n", 286 | "Who got zero score? Why? \n", 287 | "SQLQuery:\u001b[32;1m\u001b[1;3m SELECT name, score, teacher_note FROM students WHERE score = 0;\u001b[0m\n", 288 | "SQLResult: \u001b[33;1m\u001b[1;3m[('Ophelia', 0, 'Unfortunately, Ophelia missed the test.')]\u001b[0m\n", 289 | "Answer:\u001b[32;1m\u001b[1;3m Ophelia got zero score because she missed the test.\u001b[0m\n", 290 | "\u001b[1m> Finished chain.\u001b[0m\n" 291 | ] 292 | }, 293 | { 294 | "data": { 295 | "text/plain": [ 296 | "' Ophelia got zero score because she missed the test.'" 297 | ] 298 | }, 299 | "execution_count": 48, 300 | "metadata": {}, 301 | "output_type": "execute_result" 302 | } 303 | ], 304 | "source": [ 305 | "db_chain.run(\"Who got zero score? Why?\")" 306 | ] 307 | }, 308 | { 309 | "cell_type": "code", 310 | "execution_count": 49, 311 | "metadata": {}, 312 | "outputs": [ 313 | { 314 | "name": "stdout", 315 | "output_type": "stream", 316 | "text": [ 317 | "\n", 318 | "\n", 319 | "\u001b[1m> Entering new SQLDatabaseChain chain...\u001b[0m\n", 320 | "Who got zero score? Show me her parent's contact information. \n", 321 | "SQLQuery:\u001b[32;1m\u001b[1;3m SELECT parents.parent_name, parents.parent_mobile FROM parents INNER JOIN students ON parents.student_name = students.name WHERE students.score = 0;\u001b[0m\n", 322 | "SQLResult: \u001b[33;1m\u001b[1;3m[('Tracy', '0881111111')]\u001b[0m\n", 323 | "Answer:\u001b[32;1m\u001b[1;3m Tracy is the parent of the student who got zero score. Her contact information is 0881111111.\u001b[0m\n", 324 | "\u001b[1m> Finished chain.\u001b[0m\n" 325 | ] 326 | }, 327 | { 328 | "data": { 329 | "text/plain": [ 330 | "' Tracy is the parent of the student who got zero score. Her contact information is 0881111111.'" 331 | ] 332 | }, 333 | "execution_count": 49, 334 | "metadata": {}, 335 | "output_type": "execute_result" 336 | } 337 | ], 338 | "source": [ 339 | "db_chain.run(\"Who got zero score? Show me her parent's contact information.\")" 340 | ] 341 | } 342 | ], 343 | "metadata": { 344 | "colab": { 345 | "authorship_tag": "ABX9TyOI6crcxsa6XS6O/5roNqo8", 346 | "include_colab_link": true, 347 | "provenance": [] 348 | }, 349 | "kernelspec": { 350 | "display_name": "Python 3", 351 | "name": "python3" 352 | }, 353 | "language_info": { 354 | "codemirror_mode": { 355 | "name": "ipython", 356 | "version": 3 357 | }, 358 | "file_extension": ".py", 359 | "mimetype": "text/x-python", 360 | "name": "python", 361 | "nbconvert_exporter": "python", 362 | "pygments_lexer": "ipython3", 363 | "version": "3.9.16" 364 | } 365 | }, 366 | "nbformat": 4, 367 | "nbformat_minor": 0 368 | } 369 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Chat with SQL database via LangChain SQLDatabaseChain 2 | 3 | ## [Chat_with_SQL_Database.ipynb](./Chat_with_SQL_Database.ipynb) 4 | 5 | In this Python notebook, I will show you how to use SQLDatabaseChain to interact with a MySQL database in natural language. 6 | 7 | ### How to use 8 | 1. Configure `.env` with your valid OpenAI API key in your local env following the example `.env.example`. 9 | 2. Install and launch MySQL database server in your local env. 10 | 3. Create a new database `students`. 11 | 4. Import [students.sql](./students.sql) into the created databse in step 3. 12 | -------------------------------------------------------------------------------- /students.sql: -------------------------------------------------------------------------------- 1 | # ************************************************************ 2 | # Sequel Pro SQL dump 3 | # Version 5446 4 | # 5 | # https://www.sequelpro.com/ 6 | # https://github.com/sequelpro/sequelpro 7 | # 8 | # Host: 127.0.0.1 (MySQL 5.7.30) 9 | # Database: students 10 | # Generation Time: 2023-04-16 23:38:52 +0000 11 | # ************************************************************ 12 | 13 | 14 | /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; 15 | /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; 16 | /*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; 17 | /*!40101 SET NAMES utf8 */; 18 | SET NAMES utf8mb4; 19 | /*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */; 20 | /*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */; 21 | /*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */; 22 | 23 | 24 | # Dump of table parents 25 | # ------------------------------------------------------------ 26 | 27 | DROP TABLE IF EXISTS `parents`; 28 | 29 | CREATE TABLE `parents` ( 30 | `id` int(11) unsigned NOT NULL AUTO_INCREMENT, 31 | `student_name` varchar(20) DEFAULT '', 32 | `parent_name` varchar(20) DEFAULT NULL, 33 | `parent_mobile` varchar(10) DEFAULT NULL, 34 | PRIMARY KEY (`id`) 35 | ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; 36 | 37 | LOCK TABLES `parents` WRITE; 38 | /*!40000 ALTER TABLE `parents` DISABLE KEYS */; 39 | 40 | INSERT INTO `parents` (`id`, `student_name`, `parent_name`, `parent_mobile`) 41 | VALUES 42 | (1,'Alex','Barry','0881234567'), 43 | (2,'Alice','Jessica','0891234567'), 44 | (3,'Jack','Simon','0876666666'), 45 | (5,'Ophelia','Tracy','0881111111'); 46 | 47 | /*!40000 ALTER TABLE `parents` ENABLE KEYS */; 48 | UNLOCK TABLES; 49 | 50 | 51 | # Dump of table students 52 | # ------------------------------------------------------------ 53 | 54 | DROP TABLE IF EXISTS `students`; 55 | 56 | CREATE TABLE `students` ( 57 | `id` int(11) unsigned NOT NULL AUTO_INCREMENT, 58 | `name` varchar(11) DEFAULT NULL, 59 | `score` int(11) DEFAULT NULL, 60 | `teacher_note` text, 61 | PRIMARY KEY (`id`) 62 | ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; 63 | 64 | LOCK TABLES `students` WRITE; 65 | /*!40000 ALTER TABLE `students` DISABLE KEYS */; 66 | 67 | INSERT INTO `students` (`id`, `name`, `score`, `teacher_note`) 68 | VALUES 69 | (1,'Alex',100,'Alex did perfectly every day in the class. There is no surprise he got the full mark.'), 70 | (2,'Alice',70,'Alice needs a lot of improvements.'), 71 | (3,'Jack',75,'Even it\'s not the best, Jack has already improved. Keep going.'), 72 | (4,'Ophelia',0,'Unfortunately, Ophelia missed the test.'), 73 | (5,'Zack',60,'Zack needs to do better.'); 74 | 75 | /*!40000 ALTER TABLE `students` ENABLE KEYS */; 76 | UNLOCK TABLES; 77 | 78 | 79 | 80 | /*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */; 81 | /*!40101 SET SQL_MODE=@OLD_SQL_MODE */; 82 | /*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */; 83 | /*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */; 84 | /*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */; 85 | /*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */; 86 | --------------------------------------------------------------------------------