Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/pkx8326/drawing_triangles_with_mysql

This repository contains simple sets of codes that draw triangles in the form of ASCII art using MySQL. I cam across these codes on HackerRank and I thought it was a very strange concept to SQL to draw triangles with ASCII art. But then it became a challenging tasks and I learned to use information_schema.tables, a dummy table that exists in every MySQL session.
https://github.com/pkx8326/drawing_triangles_with_mysql

hackerrank hackerrank-solutions information-schema mysql sql

Last synced: about 2 months ago
JSON representation

This repository contains simple sets of codes that draw triangles in the form of ASCII art using MySQL. I cam across these codes on HackerRank and I thought it was a very strange concept to SQL to draw triangles with ASCII art. But then it became a challenging tasks and I learned to use information_schema.tables, a dummy table that exists in every MySQL session.

Awesome Lists containing this project

README

        

# Drawing_Triangles_with_MySQL
This repository contains simple sets of codes that draw triangles in the form of ASCII art using MySQL. I cam across these codes on HackerRank and I thought it was a very strange concept to SQL to draw triangles with ASCII art. But then it became a challenging tasks and I learned to use information_schema.tables, a dummy table that exists in every MySQL session.

You can find the original problems and discussions from the following links:

Draw the Triangle 1: https://bit.ly/3ATG0WY
Draw the Triangle 2: https://bit.ly/3oqjEam

The propblem #2 is simply the reverse version of the #1, however it imposes an additional logical step in the code.

Each set of the code also requires the user to create a user-defined variable using '@' assignment syntax. More information about user- and system-defined variables in MySQL with '@' assignment syntax can be found here: https://bit.ly/34A9oVV