A JOIN clause is used to combine rows from two or more tables, based on a related column between them. Different types of join: 1. (INNER) JOIN Select records that have matching values in both tables. INNER JOIN is the same as JOIN.
CASE is used to provide if-then-else type of logic to SQL. There are two formats, and both are used to return a result based on testing an expression. The first is a Simple CASE expression, where we compare an expression to static values. It tests one expression against multiple values, this makes it great for transforming one
A view is the result set of a stored query on the data, which the database users can query. · Views can join and simplify multiple tables into a single virtual table. · Views can act as aggregated tables, where the database engine aggregates data (sum, average, etc.) and presents the calculated results as part of the data. · Views can
User Defined Functions(UDF) SQL Server allows us to create our own functions called as user defined functions. A function is a stored program that you can pass parameters into and return a value. For example, if we want to perform some calculations then we can place them in separate function and store it in the database. Whenever we need the calculation,
The MERGE statement is used to make changes in one table based on values matched from another. It can be used to combine insert, update, and delete operations into one statement.If you need to perform INSERT, UPDATE and DELETE operations on a TARGET table by matching the records from the SOURCE table Performs insert, update, or delete operations on
A SQL Injection (SQLI) attack consists of insertion or “injection” of a SQL query via the input data from the client to the application. A successful SQL injection exploit can read sensitive data from the database, modify database data (Insert/Update/Delete), execute administration operations on the database (such as shutdown the DBMS), recover the content of a given file present on the DBMS file