Learn SQL #3 : SQL Commands

SQL Commands Now that we know how SQL works in a database system, it is now time to learn what  sql commands (code) we need to write for specific operations.
As we said in our previous post, SQL gives you complete power over your data. But what does this mean exactly? We have many types of commands which allow you to do different operations with your data.

SQL Commands

These types of sql commands are of different nature, depending on the type of action they perform in the database:

Data definition language (DDL):

The SQL commands that are part of this group are:

  • CREATE – used to create new tables or any other object in the database
  • ALTER – used to modify the structure of a table or any object in the database
  • DROP – used to completely delete an object from the database

Data manipulation language (DML):

  • INSERT – used to insert new data in the databse
  • UPDATE – used to modify any existing data in the database
  • DELETE – uesd to delete any data from the database

Data control language (DCL):

  • GRANT – is used to give users access to different permissions
  • REVOKE – is the opposite of GRANT, it denies users access to certain features

Data Query language (DQL):

  • SELECT- this basic command is used to retrieve information from the database

The power is yours

All of these SQL commands will help you in developing a database system where you can store and manipulate all of your data.

Also, if you consider your stored data needs modifying (updating), then you also have the power of doing this.

Depending on your RDBMS, you have the possibilities to set access levels to your data, creating a layer of security between you and other people that might be interested in the data you are storing.

Thus, like we’ve said before, SQL gives you complete power over your data, where/how you store it, who has access to it and who can modify it.

Many types of SQL

We’ve said in our previous articles, there are more dialects of SQL, depending on what database system (RDBMS) is queried for data.

We just presented the basic commands here, that will work on any RDBMS, but their exact syntax might be different if you’re looking for more extensive options.

Thus, the most common RDBMS systems and their SQL dialects are:

About Radu Gheorghiu

Passionate SQL Developer on the journey of trying to become an expert in all things Data (storage, manipulation, gathering etc.) Information is power, and information can only be obtained from data. Thus, in order to harness the power of information, you must be a master of Data.

1 thought on “Learn SQL #3 : SQL Commands

Leave a Reply

Your email address will not be published. Required fields are marked *