Results for "mysql"

30 / 184 posts

What is the difference between DELETE and TRUNCATE statements in SQL?

--What is the difference between DELETE and TRUNCATE statements in SQL? --DELETE and TRUNCATE are both SQL commands that can be used to remove data from a …

database mysql postgresql
Mar 19, 2026 2 min read

How to comma separate value by using XML in SQL server

Before SQL Server 2017 (14.x), you can achieve the comma-separated values using the XML method. Here's an example of how you can achieve this: DECLARE @Sta…

database mysql postgresql
Mar 19, 2026 2 min read

Added columns in a table by dynamic ways

IF OBJECT_ID('AddedDynamicColumn','P') IS NOT NULL BEGIN DROP PROC AddedDynamicColumn END GO CREATE PROCEDURE AddedDynamicColumn AS BEGIN SELECT ED.empid,E…

database mysql pivot
Mar 19, 2026 5 min read

How to get first date of given date or month.

Get First date of month: SELECT DATEFROMPARTS(YEAR(GETDATE()), MONTH(GETDATE()), 1) AS FirstDayOfCurrentMonth Create function for that IF NOT EXISTS (SELEC…

database mysql pivot
Mar 19, 2026 1 min read

How to Two series with comma separate(any Delimiter) value split into in rows respectively

If we have two series with comma separate(any Delimiter) value and we want split into in rows, I have create function for that: IF OBJECT_ID('TF_SplitTwoSe…

comma saparate database mysql
Mar 19, 2026 1 min read

Use of Apply(Cross and Outer) operator in SQL server

APPLY operator joins two table expressions. Also, I'll show how it differs from regular JOINs. Operator: CROSS APPLY Similar: INNER JOIN When to Use: Use a…

comma saparate database excel
Mar 19, 2026 3 min read

Find column in the whole database in sql server

To find a specific column in the whole database in SQL Server, you can query the information schema views. Here's a query you can use: SELECT table_name, c…

database mysql SQL Server
Mar 19, 2026 1 min read

How to use Magic (virtual) table INSERTED and DELETED in SQL server

Magic Tables are virtual tables that are automatically created and maintained by SQL Server for each data modification operation performed on a table. They…

comma saparate database mysql
Mar 19, 2026 2 min read

UNION, UNION All, INTERSECT, EXCEPT used in SQL Server

UNION : The UNION operator is used to combine the result sets of two or more SELECT statements into a single result set. It removes duplicate rows from the…

database EXCEPT INTERSECT
Mar 19, 2026 2 min read

What is an Index? Explain its different types in SQL

✅ Index in SQL Server (इंडेक्स इन SQL सर्वर): Index SQL Server में एक database object (डेटाबेस ऑब्जेक्ट) है जो टेबल के डेटा को जल्दी से प्राप्त करने के लिए…

database Index mysql
Mar 19, 2026 9 min read

What is View in SQL server

A view is a virtual table based on the result-set of an SQL statement. A view contains rows and columns, just like a real table. IF OBJECT_ID('ViewTable','…

cloud comma saparate database
Mar 19, 2026 1 min read

Normalization in Databases

Normalization in a database is the process of organizing the data to reduce redundancy and improve data integrity. The main goal of normalization is to bre…

comma saparate database mysql
Mar 19, 2026 2 min read

Triggers in SQL server

A trigger in SQL is a special type of stored procedure that runs automatically when certain actions happen in a table or view . A trigger cannot be explici…

comma saparate database mysql
Mar 19, 2026 7 min read

Window Aggregate Functions in SQL

What is window function: Imagine you have a dataset with many rows, and you want to perform some calculations on each row based on a group of rows related …

comma saparate database mysql
Mar 19, 2026 5 min read

Implementing Transactions,Error Handling, and Dynamic SQL in SQL

Think of a transaction as a complete package deal. It's like when you buy something from a store. You give them money, and in return, you expect to get the…

comma saparate database Dynamic SQL
Mar 19, 2026 16 min read

What are Constraints in SQL?

SQL में constraints डेटाबेस टेबल में डेटा को सुरक्षित और सही बनाए रखने के लिए उपयोग किए जाते हैं। ये टेबल में डेटा की वैधता (validity) और अखंडता (integrity…

azure comma saparate Constraints
Mar 19, 2026 3 min read

ANY and ALL operators used in SQL

The ANY operator: returns a boolean value as a result returns TRUE if any of the sub-query values meet the condition Any means that the condition will be t…

comma saparate database mysql
Mar 19, 2026 1 min read

Order by index number in SQL

SELECT empid, lastname FROM HR.Employees ORDER BY 1 DESC --order by first column SELECT empid, lastname FROM HR.Employees ORDER BY 2 DESC --order by second…

comma saparate Indexing mysql
Mar 19, 2026 1 min read

Logical Query Processing Phases in SQL

SQL query processing consists of several logical phases, which describe the order in which SQL statements are evaluated. These phases help in understanding…

database mysql oracle
Mar 19, 2026 3 min read

Filtering the data with TOP and OFFSET-FETCH In SQL

TOP: SELECT TOP (5) productid, unitprice FROM Production.Products WHERE categoryid = 1 ORDER BY unitprice DESC; SELECT TOP (5) WITH TIES productid, unitpri…

database mysql OFFSET-FETCH
Mar 19, 2026 3 min read

How to get first date From month and Finyear

If we have Finyear and month then we create a date for examples: DECLARE @finyear CHAR(5) = '202425'; DECLARE @month smallint = 5; --Get Year DECLARE @year…

comma saparate database DAteformatparts
Mar 19, 2026 1 min read

Insert <br> tag in SQL text string

CREATE or ALTER FUNCTION dbo.Fn_InserBRtag(@inputString NVARCHAR(MAX)) RETURNS NVARCHAR(MAX) AS BEGIN DECLARE @resultString NVARCHAR(MAX) = ''; DECLARE @st…

br comma saparate mysql
Mar 19, 2026 1 min read

What is Power BI

Power BI is a suite of business analytics tools developed by Microsoft that allows you to visualize and share insights from your data. Power BI consists of…

business-intelligence comma saparate data-visualization
Mar 19, 2026 2 min read

Schema and Handling Corrupt data in PySpark

A schema in PySpark (and generally in data processing) defines the structure of a DataFrame, including the names and data types of each column. It serves a…

comma saparate data-engineering database
Mar 19, 2026 4 min read

Pivoting and Unpivoting Data in SQL

Pivoting Data : Pivoting is the process of converting rows of data into columns, effectively changing the orientation of your data. It's useful when you ha…

database mysql pivot
Mar 19, 2026 6 min read

Store Error Logs In SQL

Create Table for Error log: CREATE TABLE &#091;dbo].&#091;ErrorLog]( &#091;ErrorLogID] &#091;int] IDENTITY(1,1) NOT NULL, &#091;ErrorTime] &#091;datetime] …

azure mysql programming
Mar 19, 2026 2 min read

What difference between between MySQL and MSSQL

Feature MySQL MSSQL Ownership Oracle Corporation Microsoft Licensing Open-source (GPL) and commercial versions Commercial with free Express Edition Operati…

mysql
Mar 19, 2026 2 min read

Variables In MySQL

Variables are used to store values temporarily during the execution of SQL queries. There are two main types of variables in MySQL: Session Variables : Ses…

mysql
Mar 19, 2026 1 min read

Stored Procedure in MySQL

Syntax for Creating a Stored Procedure DELIMITER // CREATE PROCEDURE procedure_name (IN param1 data_type, OUT param2 data_type) BEGIN -- SQL statements END…

Mar 19, 2026 1 min read

Functions in MySQL

In MySQL, a Function is similar to a Stored Procedure but with some key differences. Functions are used to perform calculations or operations and return a …

Mar 19, 2026 1 min read