Quantcast
Channel: SQL Server tips ,SQL Server tutorials, database tips- Indiandotnet
Browsing all 94 articles
Browse latest View live

Image may be NSFW.
Clik here to view.

Find first not null value from different columns TIP # 47

 Problem:Sometimes, it might be possible that we need not null value only from particular columns and if all column have null value then we provide a default value.Lets understand this by a general and...

View Article



Image may be NSFW.
Clik here to view.

CONCAT a valuable function TIP #47

 This is one  the new feature inSQL Server 2012 by which you can concatenate values. The USP of the function is that it handle the NULL values also.means if you are concatenating values in which null...

View Article

Image may be NSFW.
Clik here to view.

A Interview question How to determine what value you have updated of a column...

 Problem:-Sometimes it may require that whatever you have updated you want to know what was the previous value of that column?It was asked by many interviewer in the interview how to avoid trigger or...

View Article

Image may be NSFW.
Clik here to view.

How to get records who has phonetic similarity - a hidden feature in SQL...

Sometimes , It may required that you want a query who can provide you result which have phonetic similarity.Lets understand this by example Suppose you want to search a record whose pronunciation or...

View Article

Image may be NSFW.
Clik here to view.

COUNT_BIG() is for counting big range TIP #50

 Problem:- How to count large number of rows for specific condition ?SolutionSuppose you have a large table which having more than millions of records and you want to count no of rows for specific...

View Article


Image may be NSFW.
Clik here to view.

A hidden feature sp_MSforeachtable–run on entire tables of a Database TIP# 51

Problem:-Sometimes it happened that you need to run a single statement on entire tables which exists in database.  so most of the time we think of cursor which run for each sys.objects (table)  and we...

View Article

Image may be NSFW.
Clik here to view.

A hidden feature sp_MSforeachdb TIP #52

 As we discussed yesterday a hidden feature tip #51 which is sp_MSForeachtable . sp_MsForeachtable is useful to run command on each table of selected database. Now what if we want to run command on...

View Article

Image may be NSFW.
Clik here to view.

How Enable /Disable all CONSTRAINT on a table ? tip #53

 Dear Friends,Although , When we have designed our database he/she knows what type of constraints is require to make data perfect and the Database designer applies those constraints but it might be...

View Article


Image may be NSFW.
Clik here to view.

What is Heap table in SQL Server and How to get all the heap table from a...

 Heap table:- A table without cluster index is called Heap table. Now you are thinking why we are talking about this.So as  SQL developer we should aware and In next post I will explain which is...

View Article


Image may be NSFW.
Clik here to view.

Maintenance of fragmented Heap table–TIP #55

 Friends,In last post  post #54  we understood what is a Heap table. Now the challenge is what if this table is highly fragmented so.Now our task is to run maintenance of this highly fragmented...

View Article

Good to Know SQL JARGON - An interview TIP #56

 Hello friends,Just wanted to share some technical words here again it is good to know1) OLAP :  On Line Analytical  Processing 2) MOLAP :- Multidimensional  On Line Analytical Processing 3) ROLAP :-...

View Article

Image may be NSFW.
Clik here to view.

What is TVP (Table Value Parameter) & How to use it ? TIP #57

 This is one of the interesting feature which I like most. Instead of passing values from collection one by one pass entire collection to stored procedure as a table value parameter.I know above...

View Article

Image may be NSFW.
Clik here to view.

Merge Statement one of the way to synch destination from source table TIP# 58

 Problem:-  Suppose you have a source table and one destination table and you want to synch destination table from source table. means if record is already exists then you need to update and the record...

View Article


Image may be NSFW.
Clik here to view.

Find last statistics updated date detail ?–Maintenance TIP #59

 Problem:- One of the pain point in any SQL engineer  is “Performance”. There are various reasons due to which your SQL Server database is slow. One of the possible reason is your maintenance.   You...

View Article

Image may be NSFW.
Clik here to view.

Grouping Sets–Good to know feature TIP# 60

 Grouping sets is one of the cool feature came in SQL SERVER 2008. Lets understand here with problem and solution.Problem:-  Suppose , We want  an aggregation result in a query with different groups....

View Article


Image may be NSFW.
Clik here to view.

Database Diagram support object cannot be install error-SSMS TIP# 61

 Problem:-  It is general problem that you are interested in generating the database diagram of a database and when you right click on database diagrams folder of database and try to create a new...

View Article

Image may be NSFW.
Clik here to view.

Converting Row to Column use Pivot feature TIP #62

 Problem:  Sometimes we may require to convert row data to column. we require pivot view of data.Solution:  Lets understand this by an example below I am using a table variable which have few columns...

View Article


Image may be NSFW.
Clik here to view.

Various available string functions in SQL Server TIP # 63

 There are various functions available in SQL Server and it is good to know all of them you never know when they will be helpful to you.So lets start one by one.1) LEN :-   By the name it is clear that...

View Article

Image may be NSFW.
Clik here to view.

How to take compressed backup in SQL Server TIP #64

Problem:-  A good maintenance plan always said to take backup but sometimes it is very difficult to take backup of database just because of space constraint.We take backup but we don’t have enough...

View Article

Image may be NSFW.
Clik here to view.

Did I take right backup ! how to ensure backup can be restore ? TIP # 65

 Problem:- We have seen last time how to take backup in tip # 64.   but sometimes it happened we took backup  and we are not able to restore it. It might be corrupted.Now , Next step thought come in...

View Article
Browsing all 94 articles
Browse latest View live




Latest Images