coderz.py

Keep Coding Keep Cheering!

SQL: AND & OR operators

The AND and OR operators are used in SQL to filter data and produce precise results based on conditions. Multiple conditions can also be combined using the SQL AND & OR operators. In a SELECT, INSERT, UPDATE, or DELETE statement, these two operators can be combined to test for multiple conditions. Note: It is critical […]

March 31, 2023 | DBMS | No comments

SQL: DISTINCT keyword

What is the SQL DISTINCT keyword? The SQL DISTINCT keyword is used in conjunction with the SELECT statement to remove all duplicate records and only return unique records. DISTINCT can also be used in conjunction with aggregate SQL functions such as COUNT, MAX, SUM, AVG, and so on. DISTINCT operates not only on a single […]

March 29, 2023 | DBMS | No comments

SQL: HAVING Clause

The HAVING clause in SQL Server includes one or more conditions that must be TRUE for groups of records. It’s similar to the GROUP BY clause’s WHERE clause. The only distinction is that the WHERE clause cannot be used with aggregate functions, whereas the HAVING clause can. The HAVING clause is always followed by the […]

March 28, 2023 | DBMS | No comments

SQL: Group By Clause

The SQL Group By statement is used to organize similar data into groups. The data is further organized using an equivalent function. It means that if multiple rows in a specific column have the same values, they will be grouped. The SELECT statement is combined with the GROUP BY clause in a SQL query: The […]

March 28, 2023 | DBMS | No comments

SQL: ORDER BY Clause

What is the ORDER BY Clause? In the SELECT query, the ORDER BY clause can be used to sort the result in ascending or descending order of one or more columns. ORDER BY by default sorts the data in ascending order. We can sort the data in descending order with the keyword DESC and ascending […]

March 26, 2023 | DBMS | No comments

SQL: LIKE clause

In SQL to filter data based on a specific pattern, the LIKE clause is used in the WHERE condition. It can be applied to date, string, or numeric values. However, using the string values is advised. Uses of LIKE clause in SQL: The following are some examples of how the LIKE clause is used: Enables […]

March 25, 2023 | DBMS | No comments

SQL: WHERE clause

When retrieving data from a single table or by joining data from multiple tables, a condition is specified using the SQL WHERE clause. If the given condition is satisfied, then only it returns a specific value from the table. The WHERE clause should be used to filter the records and only retrieve those that are […]

March 24, 2023 | DBMS | No comments

DCL Commands: GRANT and REVOKE

What is DCL? Data Control Language is known as DCL in SQL. By creating users and granting or removing privileges from users, DCL commands are used to regulate and manage access to the database. There are two main DCL commands in SQL: GRANT REVOKE. GRANT Query: SQL GRANT command is used to grant specific privileges […]

March 23, 2023 | DBMS | No comments

SQL: TCL Commands

What is TCL? Transactional control commands(TCL) can only be used with DML commands like INSERT, UPDATE, and DELETE. They cannot be used when creating or deleting tables because the database automatically commits these operations. NOTE: Before proceeding with TCL commands, you must know about the DML & DDL commands. COMMIT command: The Commit command is used […]

March 22, 2023 | DBMS | No comments

SQL: DELETE Query

What is Delete Query? In SQL, the DELETE Query removes existing records from a table. Depending on the condition specified in the WHERE clause, we can delete a single record or multiple records. NOTE: This command must be used with extreme caution because it permanently deletes the data. Syntax: where table_name is the table that has […]

March 22, 2023 | DBMS | No comments

Advertisement