Create, Alter and Drop | DDL

Data Definition Language

In this section, we will learn how to make use of CREATE, ALTER and DROP statements to change the database structure.

DDL stands for Data Definition Language that is used to create or alter the database schema and define constraints. DDL statements represent the definition of data structures. It is declarative and can be used to define tables, views, indexes, name spaces, table spaces, databases, stored procedures and functions, triggers and users.

Objects can be created using CREATE and deleted using DROP. GRANT and REVOKE are statements used to add access privileges and remove them respectively. ALTER is used to modify created object's properties.

We will learn more about in the upcoming sections:

  • PostgreSQL CREATE
  • ALTER tables, columns, primary keys
  • CREATE AND ALTER Sequences and increments
  • ALTER Constraints
  • RENAME and DROP
Did you find this page helpful?
Start with GraphQL on Hasura for Free
  • ArrowBuild apps and APIs 10x faster
  • ArrowBuilt-in authorization and caching
  • Arrow8x more performant than hand-rolled APIs
Promo
footer illustration
Brand logo
© 2024 Hasura Inc. All rights reserved
Github
Titter
Discord
Facebook
Instagram
Youtube
Linkedin