This article describes the use of different query and operator of SQL.
Hello friends, In my previous article you saw some Structured Query Language (SQL) commands. And now I share some more commands of SQL. If you haven't read my previous article of SQL please then read that article first because in that article I explained how to create databases and tables. Also, how to insert values into the tables and more. So please read the first article from here: Ok, let's start.First we show how many values we have in the database as in the following:
The output is:
“LIKE “Like is used when we want to search for a specific pattern. For example, we only need the person whose name starts with the letter “s” or ends with “z”. So let's see this practically.
“IN” Operator
The In operator is used to select multiple values.
“BETWEEN” OperatorThe Between operator is used to select the values between a specific range.
“NOT BETWEEN” Operator
SQL AliasSQL alias is used to temporarily rename the table name or column. To make an alias we use the “AS” operator as in the following:
Here we can see that “address” is changed to “city”.
ALTER OperatorThe Alter operator is used to add, delete or modify the column.ADD column by ALTER Operator
Now if we see the table then it looks like:
Here we can see that one or more columns were added to the column.DROP column by ALTER Operator
Here we can see that the address column is dropped from the table.I close this article here and I think this article will help you . We will start “SQL JOINS” from the next article.
Basic SQL Queries