AWS Builder Center
SQL Essentials: Creating, Altering, and Dropping Databases

SQL Essentials: Creating, Altering, and Dropping Databases

A quick walkthrough of the core SQL commands for managing database tables, based on my recent AWS re/Start lab.

Full-Stack Developer | AWS re/Start Trainee | Building in Public
In our AWS re/Start program, we just started the Databases module. After spending weeks building infrastructure and writing Python scripts, it’s refreshing to get back to writing SQL.
Our latest lab focused on the fundamental commands used to manage databases and tables. As a full-stack developer, I'm used to writing  SELECT  and  JOIN  queries, but this lab reminded me of the commands we use to build the actual structure (the schema) behind the scenes.
Here are the four core commands we practiced:

1. CREATE

You use this to build new databases and tables. For example, to create a new database, you run:
sql
CREATE DATABASE world;
To create a table, you define the columns, data types (like  INT ,  CHAR ,  FLOAT ), and the primary key.

2. SHOW

This is how you inspect your environment.
  •  SHOW DATABASES;  lists all the databases on the server.
  •  SHOW TABLES;  lists all the tables inside the currently selected database.
  •  SHOW COLUMNS FROM world.country;  displays the schema of a specific table.

3. ALTER

Made a typo in your column name? Need to change a data type?  ALTER  is used to modify an existing table structure without deleting the data. In our lab, we fixed a misspelled column:
sql
ALTER TABLE world.country RENAME COLUMN Conitinent TO Continent;

4. DROP

This is the destructive command.  DROP TABLE  deletes a table entirely, and  DROP DATABASE  wipes out the whole database. There is no "undo" button for this unless you have a backup.
sql
DROP DATABASE world;

Why This Matters for Cloud

When we move to managed services like Amazon RDS or Aurora, we usually don't run these commands manually in a terminal. We use tools like Prisma or AWS CloudFormation to run these commands automatically as part of our deployment pipeline. But knowing the raw SQL is essential for troubleshooting when an automated migration fails.
Are you team raw SQL or team ORM (Object-Relational Mapper)? Let me know below!
 #sql   #databases   #aws-restart   #mysql   #cloud 
Any opinions in this article are those of the individual author and may not reflect the opinions of AWS.
Enjoyed reading this content? Let the author know!

Your likes, comments, shares, and saves help creators reach more builders.

Loading recommendations

Loading article