SQL Queries
SQL is the standard language for interacting with relational databases. In QuymnyDB you send the same queries you'd run locally with xampp, mysql, postgres or any other SQL database — they just execute against your cloud database.
Common query patterns
-- Create database
CREATE DATABASE mychool;
-- Employees table
CREATE TABLE employees (
employee_id INT PRIMARY KEY AUTO_INCREMENT,
first_name VARCHAR(50) NOT NULL,
last_name VARCHAR(50) NOT NULL,
email VARCHAR(100) UNIQUE,
phone VARCHAR(20),
job_title VARCHAR(100),
salary DECIMAL(10,2),
hire_date DATE
);
-- Customers table
CREATE TABLE customers (
customer_id INT PRIMARY KEY AUTO_INCREMENT,
first_name VARCHAR(50) NOT NULL,
last_name VARCHAR(50) NOT NULL,
email VARCHAR(100) UNIQUE,
phone VARCHAR(20),
address VARCHAR(255),
created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP
);
QuymnyDB Shell
Use the QuymnyDB shell to run SQL queries directly against your cloud database. The shell provides a convenient interface for executing queries and managing your database schema. In this shell you don't need to run queries such as USE database_name — once you are in the database name displaying at the header, it's automatically the current database you are working on.
Error Handling
If you type a query incorrectly, the shell will display an error message indicating the issue. Make sure the related data you are trying to run the query against is available in the database, and that you are typing the query correctly. This is mostly the case when altering, dropping, or inserting data into a table or database — if the table or database is not available in the current database, the shell will show an error. But once you type your queries correctly and the related data exists, the shell will execute the query successfully and display the result.