Results for "IF"

37 / 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

What difference between the DATEPART() and DATENAME() functions?

The difference between the DATEPART() and DATENAME() functions lies in their definitions. DATEPART() returns an integer that represents the specified datep…

SQL
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 one series with comma separate(any Delimiter) value split into in rows

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

database pivot SQL Server
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 GOTO statement in SQL server

If you want to jump to a specific point in your SQL code, you can use the GOTO statement. The GOTO statement is used to exit a loop or a nested block of co…

database GOTO oracle
Mar 19, 2026 2 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

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

SQL Server Data type

SQL Server provides a variety of data types to store different kinds of data efficiently. Here are some commonly used SQL Server data types: CHAR(size): A …

comma saparate database Datatype
Mar 19, 2026 4 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

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

Basic of DAX query

// How to check null ISBLANK(EmployeeDetails[DateofLeaving]) //if condition IF(ISBLANK(EmployeeDetails[DateofLeaving]),TODAY(),EmployeeDetails&#0…

IF ISBLANK ISBLANK()
Mar 19, 2026 1 min read

Databricks widgets

Input widgets allow you to add parameters to your notebooks and dashboards. You can add a widget from the Databricks UI or using the widget API.  If y…

comma saparate database Dropdown
Mar 19, 2026 1 min read

Spark SQL useful command

Spark SQL provides a variety of commands for managing databases, tables, and performing SQL operations. CREATE DATABASE IF NOT EXISTS demo; SHOW DATABASES;…

create table database spark sql
Mar 19, 2026 3 min read

What is Managed and External table in Spark

In Apache Spark, both Managed and External tables are used to store the data. However, there are significant differences in how Spark manages the data for …

azure data-engineering data-science
Mar 19, 2026 3 min read

What is Resilient Distributed Datasets (RDDs)

Resilient Distributed Datasets (RDDs) are a data structure of Apache Spark. They represent an immutable, distributed collection of objects that can be proc…

ai artificial-intelligence data-engineering
Mar 19, 2026 3 min read

Spark session vs Spark context

In Apache Spark, SparkSession and SparkContext are both essential components, but they serve different purposes and have different scopes. Here's a detaile…

data-science Pandas Python
Mar 19, 2026 3 min read

How to Create table in Power BI using Dax

ROW: The ROW function in DAX creates a single row table with the specified columns and values. ROW(columnName1, value1, [columnName2, value2], ...) Si…

Power BI
Mar 19, 2026 1 min read

Calculate and Calculatetable Function in Power BI

CALCULATE : It's used to modify or filter the context in which a calculation is being performed CALCULATE(<expression>, <filter1>, <filter2&…

data-analysis DAX Power BI
Mar 19, 2026 1 min read

Split full name into first name and last name in SQL

Split full name into first name and last name : SELECT EmployeeName, CASE WHEN CHARINDEX(' ', EmployeeName) > 0 -- Check if there is a space (indicating…

microsoft programming sql-server
Mar 19, 2026 1 min read

What is Functions and Difference between Functions and Stored Procedures in SQL Server

What is a Function in sql : A function is a set of SQL Statements that perform a specific task. Basically, it is a set of SQL statements that accept only i…

database oracle programming
Mar 19, 2026 3 min read

Vectors

Definition A vector is a quantity that has both magnitude and direction . Vectors can be represented in different ways, such as geometrically (with arrows)…

Vectors
Mar 19, 2026 1 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

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

Making API Calls in Python

APIs (Application Programming Interfaces) are the bridges that allow different software systems to communicate with each other. pip install requests import…

CRUD API exceptions RequestException
Mar 19, 2026 6 min read

Database Permissions in SQL Server

In SQL Server, database permissions control what actions users can perform on specific database objects (like tables, views, and stored procedures). Permis…

azure database security
Mar 19, 2026 2 min read

Understanding SQL Query for Identifying and Analyzing Default Values and Constraint in a Database

Default constraints in SQL are used to assign a default value to a column when no value is provided during data insertion. However, managing and auditing t…

Constraint CTE database
Mar 19, 2026 8 min read

SQL Logical Operators with Examples

SQL logical operators are used to filter data by combining multiple conditions in SQL queries. These operators help in refining queries to fetch specific r…

ALl Any BETWEEN
Mar 19, 2026 3 min read

where() & filter() in PySpark

The filter() function in PySpark is used to create a new DataFrame by selecting rows that meet a specified condition or SQL expression. Alternatively, the …

arra_contain endwith Filter
Mar 19, 2026 1 min read

PySpark Built-in Functions

These functions are commonly used with groupBy() , agg() , or select() to compute things like sum, average, max, min, count, etc. PySpark functions come fr…

Aggregate apache spark for beginners big data tutorial
Mar 19, 2026 2 min read

The ALTER TABLE statement in Microsoft SQL Server (MSSQL) and PostgreSQL

The ALTER TABLE statement in Microsoft SQL Server (MSSQL) and PostgreSQL is used to modify the structure of an existing table. It allows you to: Add, drop,…

The ALTER TABLE Statement SQL
Mar 19, 2026 2 min read

Table Types Comparison: SQL Server vs PostgreSQL

Table Type SQL Server PostgreSQL Scope / Lifetime Usage Notes Permanent Table CREATE TABLE Employee (...) CREATE TABLE Employee (...) Permanent in DB until…

Table Type SQL
Mar 19, 2026 1 min read

SQL Server Agent Alerts, Operators, Database Mail & Job Activity Monitor

Production environment me sirf jobs schedule karna hi kaafi nahi hota. Hume monitoring aur notification system bhi chahiye hota hai taaki agar koi job fail…

Agent Alerts Database Mail
Mar 19, 2026 5 min read