Category DataBase
Import the data from Excel to Database in sql server 2008
Simple ways to import data from excel to database using import and export wizard of sql server. Step 1: Right Click on the respective database onto which you want to import the data from excel. In our case the name of the database is Demo. Step 2: Click on the Import Data option and you’ll […]
Difference between stored procedure and function
I find some of the difference between SP and function in sql server 1) Procedure can return zero or n values whereas function can return one value which is mandatory. 2) Procedures can have input, output parameters for it whereas functions can have only input parameters. 3) Procedure allows select as well as DML statement […]
Sql Server Database Objects
Many people think a lot of hell number of things when any interviewer asks the question what are the different objects of sql server Database. Well the answer is very simple no need to think about more on this. All the concepts that are there in the database is act like database objects and following […]
Query to get last modified procedures or table names in sql server
These are the some basic sql queries which helps during the development process. In order to get top 10 procedures names which are modified recently you can use SELECT top(10)OBJECT_NAME(object_id) as name,modify_date,type_desc,create_date FROM sys.objects WHERE type = ‘P’ Gives you last 10 modified procedure names SELECT top(10)OBJECT_NAME(object_id) as name,modify_date,type_desc,create_date FROM sys.objects WHERE type = ‘U’ […]
Difference between ISNULL and COALESCE
ISNULL ISNULL function returns null value with replacement value. Syntax : ISNULL(expression_value,replacement_value) It will take only 2 parameters or arguments.First it will check the expression value if its null then it will return replacement value. Eg : Declare @value varchar(10) Set @value = 10 Select ISNULL(@value,’n/a’) as Demo In the above scenario the output is […]