Can you explain the SELECT INTO Statement

SELECT INTO statement is used mostly to create backups. The below SQL backsup the Employee table in to the EmployeeBackUp table. One point to be noted is that the structure of pcdsEmployeeBackup and pcdsEmployee table should be same. SELECT * INTO pcdsEmployeeBackup FROM pcdsEmployee. Certainly! The SELECT INTO statement in a database management system (DBMS) … Read more

What are Aggregate and Scalar Functions

Aggregate and Scalar functions are in built function for counting and calculations. Aggregate functions operate against a group of values but returns only one value. AVG(column) :- Returns the average value of a column COUNT(column) :- Returns the number of rows (without a NULL value) of a column COUNT(*) :- Returns the number of selected … Read more

What is a Sub-Query

A query nested inside a SELECT statement is known as a subquery and is an alternative to complex join statements. A subquery combines data from multiple tables and returns results that are inserted into the WHERE condition of the main query. A subquery is always enclosed within parentheses and returns a column. A subquery can … Read more

What is the difference between “HAVING” and “WHERE” clause

“HAVING” clause is used to specify filtering criteria for “GROUP BY”, while “WHERE” clause applies on normal SQL. The “WHERE” and “HAVING” clauses in a database management system (DBMS) both filter data, but they operate at different stages of the query process and are used for different purposes. WHERE Clause: The “WHERE” clause is used … Read more

What is “Group by” clause

Group by” clause group similar data so that aggregate values can be derived. The “Group by” clause in a database management system (DBMS) is used to group rows that have the same values into summary rows or groups based on one or more columns. It is commonly used with aggregate functions like COUNT, SUM, AVG, … Read more