Results for "Create"

26 / 184 posts

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

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

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

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

DateTime in Python

In Python, the datetime module provides classes for manipulating dates and times. It offers several functions and methods to create, manipulate, and format…

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, &#091;columnName2, value2], ...) Si…

Power BI
Mar 19, 2026 1 min read

SQL MERGE statement

CREATE DATABASE SqlShackMergeDemo GO USE SqlShackMergeDemo GO CREATE TABLE SourceProducts( ProductID INT, ProductName VARCHAR(50), Price DECIMAL(9,2) ) GO …

database insert Power BI
Mar 19, 2026 1 min read

PartitionBy() in PySpark

partitionBy() एक function है जो DataFrame को disk par likhne (write) के time par use hota hai. ये function pyspark.sql.DataFrameWriter class ka part hai. �…

create table Data Skew partitionBy
Mar 19, 2026 3 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

Database trigger to audit (Transaction logs) all of the DDL changes made to the Database

Create table DatabaseLog: CREATE TABLE &#091;dbo].&#091;DatabaseLog]( &#091;DatabaseLogID] &#091;int] IDENTITY(1,1) NOT NULL, &#091;PostTime] &#091;datetim…

azure database oracle
Mar 19, 2026 2 min read

Addition, subtraction, multiplication, and dot product using NumPy in Python:

Here are some examples of addition, subtraction, multiplication, and dot product using NumPy in Python: import numpy as np # Create two arrays a = np.array…

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

Understanding DataFrames in PySpark

DataFrames are an important data structure in PySpark. They help in handling structured and semi-structured data efficiently. DataFrames are like tables in…

Create Dataframe PySpark
Mar 19, 2026 2 min read

withColumn() in Pyspark

PySpark withColumn() is a transformation function of DataFrame which is used to change the value, convert the datatype of an existing column, create a new …

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

PySpark SQL Date and Timestamp Functions

🔧 Setup First (Optional for Reference) from pyspark.sql import functions as F from pyspark.sql import types as T data = df = spark.createDataFrame(data, )…

Date Datetime PySpark SQL Date and Timestamp Functions
Mar 19, 2026 2 min read

File Handling(create, read, write, and delete files etc.)

File Handling in Python allows us to create, read, write, and delete files . It's an essential feature when working with data that needs to be stored perma…

copy create folder delete
Mar 19, 2026 5 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

Statistics in SQL Server

Statistics SQL Server ke “mind” jaise hote hain. Ye SQL Server ko batate hain ki table me data kis tarah se distribute hai — jaise kitne values unique hain…

CREATE STATISTICS Statistics UPDATE STATISTICS
Mar 19, 2026 11 min read

What is “CREATE TABLE TYPE” in SQL Server?

Ye ek User-Defined Table Type (UDTT) hota hai. Aap SQL Server me ek custom table ka design bana lete ho, jise aap baad me Stored Procedures, Functions, aur…

CREATE TABLE TYPE Table data type Table Variable
Mar 19, 2026 2 min read

Dynamic CREATE TABLE Script in SQL Server

DECLARE @TableName NVARCHAR(100) = 'Employee'; DECLARE @SQL NVARCHAR(MAX) = ''; DECLARE @PKCols NVARCHAR(MAX) = ''; -- Get Primary Key Column(s) SELECT @PK…

Create Table dynamic Foreign Key Constraints – Automatically Generate Non-Clustered Indexes
Mar 19, 2026 4 min read