Author Archive

Basic Overview of C #

This article describes an introduction of C# programming language. What is C#? C# (pronounced C-sharp) is a one kind of objects oriented language developed by Microsoft Corporation. It is designed with the combination of C and C++. It has taken a lot of concepts from Java. Data Types in C# In a programming language Data

SQL BETWEEN operator for datetime

This article describes about the SQL between operator, how to use SQL between operator in date time operation? Create a Temp table. For the sql query is Create Table #Temp (Id varchar(2), Name varchar(15), Dob datetime); Then insert some data into the table. insert into #Temp values(‘1’, ‘Komal’, ‘1984-10-27 02:10:00’); insert into #Temp values(‘2’, ‘Ajay’,

Remove or trim the leading zeros in SQL

Some times we need to remove or trim the leading zeros in an alphanumeric column of a table flied. Following SQL query will help us to  do this. DECLARE @String nvarchar(100) SET @String='000123050' SELECT SUBSTRING(@String,PATINDEX('%[1-9]%', @String),LEN(@String)) Output After run the above query you will get the output: 123050 Remember that the orginal string was: 000123050

Difference between temp table and table variable

In SQL, temp tables and table variables are used to save or store data in temporary basis. Both are almost same, but have some difference. This article describes a comparison on SQL temp table and table variable. SQL offer four types of table structure to store data. They are: Local temporary table (#table_name) Global temporary

SQL Server Database Backup

Backup is an vital part for any database system. It reduce accidental data loses. This article describes how to create a database backup in SQL query. Summary of the article: What is Database Backup? SQL Script to Backup Single SQL Server Database SQL Script to Backup all SQL Server Databases What is Database Backup? Database