coderz.py

Keep Coding Keep Cheering!

SQL VIEWS

What are SQL Views? Views are virtual tables in SQL. A view, like every other table in the database, has rows and columns. We can create a view by selecting fields from one or more tables in the database. A View can contain all of the rows of a table or particular rows based on […]

April 7, 2023 | DBMS | No comments

SQL: SET Operations

SQL set operations combine the output of two or more SELECT statements into a single result set. The set operators appear to be similar to SQL joins, but there is a significant difference. SQL joins combine the columns from different tables, whereas SQL operators combine rows from different queries. Types of Set Operation: Union Union […]

April 6, 2023 | DBMS | No comments

SQL JOIN

What is an SQL Join? The SQL Join clause is used to combine rows from two or more related tables into a single result set based on a common column or columns, which is typically established through foreign key constraints. The “on” keyword is used to specify the join condition, which specifies the relationship between […]

April 6, 2023 | DBMS | No comments

SQL Alias – AS Keyword

What is an Alias? An SQL alias is simply an alternative name that can be used to refer to a table or column within a SQL query. This is especially useful for large or complex queries. Alias is primarily used to provide a short alias name for a complexly named column or table. The AS […]

April 3, 2023 | DBMS | No comments

SQL Functions-II

In the previous section we saw Aggregate Functions, in this section let us discuss Scalar Functions. Scalar Function: A scalar function is a type of function that returns a single value based on the input parameters. In SQL queries, scalar functions can manipulate data, perform calculations, and retrieve specific values from a database.  Following are […]

April 3, 2023 | DBMS | No comments

SQL Functions-I

What are SQL Functions? SQL functions are predefined routines that can be invoked by SQL queries to perform specific operations on database data. These functions are used to manipulate data and return results based on the parameters passed to them. SQL functions are categorized into the following two categories: Aggregate Functions Scalar Functions Aggregate Functions: […]

April 3, 2023 | DBMS | No comments

SQL Constraints

What are the SQL Constraints? SQL constraints are rules that limit the types of data that can be inserted or updated into a table. Constraints are used to enforce data integrity and ensure the accuracy and consistency of data. Constraints could be either on a column level or a table level. The column-level constraints are […]

March 31, 2023 | DBMS | No comments

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

Advertisement