Database command categories: A high level overview – DDL.

This blog post is part 1 in a ‘mini-series’ of posts providing a high-level overview of SQL database commands. Coverage here is not exhaustive, only a brief visit of the command category. I’ve also included informative resources in addition to specific sections from the official documentation (see the closing section for the link to the main PostgreSQL documentation page). Search engines are your friend for a deeper exploration.

overhead view of vintage typewriter

Photo by Florian Klauer on Unsplash


* Note: PostgreSQL is the targeted Database for this overview.
Although many, if not all discussed commands, are prevalent in other SQL database systems, I am referring to the PostgreSQL environment for the purposes of this blog post.


I. Data Definition Language (DDL) Commands

Database commands that produce (CREATE), change (ALTER), or destroy (DROP) database objects are categorized under this set of language commands.

Some examples are provided below:

  • Common CREATE commands: e.g., CREATE DATABASE, CREATE ROLE, CREATE TABLE, CREATE INDEX, CREATE TABLE, CREATE FUNCTION, CREATE VIEW, CREATE USER etc…
  • Common ALTER commands: e.g., ALTER TABLE, ALTER DATABASE, ALTER ROLE, ALTER INDEX, ALTER FUNCTION, ALTER TRIGGER, ALTER USER etc…
  • Common DROP commands: DROP ROLE, DROP TABLE, DROP DATABASE, DROP TRIGGER, DROP VIEW, DROP FUNCTION, etc…

Recommended reading and resources:

Be sure and continue to follow this series for in Part 2, we will visit SQL DML commands.
Be sure and visit the stellar on-line PostgreSQL 10 Documentation for any related questions.


A Call To Action!

Thank you for taking the time to read this post. I truly hope you discovered something interesting and enlightening. Please share your findings here, with someone else you know who would get the same value out of it as well.

Visit the Portfolio-Projects page to see blog post/technical writing I have completed for clients.

Have I mentioned how much I love a cup of coffee?!?!

To receive email notifications (Never spam) from this blog (“Digital Owl’s Prose”) for the latest blog posts as they are published, please subscribe (of your own volition) by clicking the ‘Click To Subscribe!’ button in the sidebar on the homepage! (Feel free at any time to review the Digital Owl’s Prose Privacy Policy Page for any questions you may have about: email updates, opt-in, opt-out, contact forms, etc…)

Be sure and visit the “Best Of” page for a collection of my best blog posts.


Josh Otwell is an open-source SQL database enthusiast with a passion to study and grow as a SQL Developer and blogger. Other favorite activities find him with his nose buried in a good book, article, or the Linux command line. Among those, he shares a love of tabletop RPG games, reading fantasy novels, and spending time with his wife and two daughters.


Disclaimer: The examples presented in this post are hypothetical ideas of how to achieve similar types of results. They are not the utmost best solution(s). Your particular goals and needs may vary. Use those practices that best benefit your needs and goals. Opinions are my own.

This site uses Akismet to reduce spam. Learn how your comment data is processed.