Showing posts from March, 2022Show All

Topics Sequence for Sql Tutorial

Database

DBMS and RDMBS

SQL Server

SQL Server Architecture

SSMS

Authentications Modes in SQL Server

System Databases in SQL Server

SINGLE_USER,READ_ONLY and MULTI_USER Modes in Sql Server Databases

Creating , Altering and Dropping Databases

MDF and LDF Files

Pages in Sql Server (Data Pages and Index Pages)

SQL Commands

Creating, Altering and Dropping Tables

Constarints in SQL Server

Primary Key and Foriegn Key Constraints

Cascading Referential Integrity

Not Null Constraint 

Default Constraint and It's Behaviour

Check Constraint

Unique Key Constraint

SQL Server DataTypes

SQL Server Variable

Identity Column

Retrieving Identity Column

SELECT

Group By

Where vs Having

Order of Statement Execution

Different Ways to Replace Null Values: ISNULL(), COALESCE(), CASE

Joins

Union , Union All, Except and Intersect

Store Procedures and It's Advantages

Output Parameter vs Return Values

String Functions

DateTime Functions

Cast vs Convert

Mathematical Functions

User Defined Functions: Scalar, Inline and MultiStatement UDF

Difference Between Stored Procedure and Functions

Temporary Tables: Local vs Global

Indexes

Views

DML Triggers

Derived Tables and CTE

Database Normalization

Pivot Operator

Error Handling

Transactions and ACID Properties, Nested Transactions

SubQueries and Types of SubQueries

Cursors

Merge Operator

Concurrency and Isolation Level

DeadLocks in SQL Server

Cross Apply and Outer Apply

DDL Triggers

Table Valued Parameters

GROUPING SETS, ROLLUP, CUBE

GROUPING() and GROUPING_ID()

OVER and PARTITION BY 

ROW_NUMBER(), RANK(), DENSE_RANK()

Window Functions

Rows vs Range

UnPivot

OFFSET FETCH

Identify Object Dependiencies

SEQUENCE

GUID

Dynamic SQL

QUOTENAME() and PARSENAME()

Output Parameter in Dynamic SQL

Temp tables in dynamic sql



There are two tables, show unmatched records without using NULL

Input: abc--------def--------xyzi---------pq Output: abc-def-xyzi-pq

 DECLARE @input VARCHAr(500)='abc--------def--------xyzi---------pq'


Select REPLACE(REPLACE(REPLACE(@input,'-','{}'),'}{',''),'{}','-')