Yearly Archives: 2015

SQL Recovery Software: An Ultimate Tool For SQL Database Recovery

SQL Server is a database management system which enables to store and retrieve data from the database. Due to some reasons like virus infection, improper closing of the Server, etc. the data in the database may go damaged or corrupted. … Continue reading

Posted in DBA | Tagged | 26 Comments

SQL Script to find all the triggers defined on a database or on a single table

SQL Script to find triggers in SQL Database Sometime we need to find all the triggers defined on the database. So in this case, we can use the below SQL Query:-SELECT tbl.name as [Table Name] , trig.name as [Trigger Name] … Continue reading

Posted in SQL Advanced, SQL Tips, SQL Triggers | Tagged , | 30 Comments

Interview question – Is Clustered index on column with duplicate values possible?

Through this article, we are going to discuss three important interview questions of SQL which are given below:-  1) Can we create clustered index on a column containing duplicate values?  2) Can we create a Primary Key on a table on which a … Continue reading

Posted in Interview Questions, SQL Advanced, SQL Indexes | Tagged , , , | Leave a comment

Question of the Month (July)

Question of the Month Suppose we have a table emp_plan  which contains 4 columns “Empid” (employeeid), Planid (Projectid), Startdate(Allocation Start date) and Enddate (Allocation Enddate). Its structure is given below:-4  Create table emp_plan (empid nvarchar(200),planid nvarchar(20),startdate datetime, enddate datetime) Also below … Continue reading

Posted in Interview Questions | Tagged , | 23 Comments

Do you know about Whatsapp web?

Whatsapp claims that they currently have 500 million users worldwide. That is pretty impressive looking at the good amount of distinctively decent competitors they have within the space of Social Networking communication. Viber, Line, Google Hangout,Facebook Messenger & Hike (Commonly in India). While all these products … Continue reading

Posted in Miscellaneous | Tagged , , , | 23 Comments

Script to find complete months between two given dates

Complete months between two given dates Below script will help in finding the complete months within the 2 given dates. In the below script we takes below dates as exampleStartdate =2015-07-05 Enddate =2016-01-06 /**********************Script Start**************************/ IF (object_id(‘tempdb..#month’) is not null) … Continue reading

Posted in Interview Questions, SQL Basic, SQL Server | Tagged , , | Leave a comment

Script to find the complete weeks within two given dates

Complete weeks within two given dates Sometimes we need to find out the complete weeks within two given dates. Below script will help in finding the complete weeks within 2 given dates. In this script, I have used below dates … Continue reading

Posted in Interview Questions, SQL Basic, SQL Server, SQL Tips | Tagged , | 21 Comments

Importance of Best Practices in database programming

Best Practices in database programming For any programming language, just writing the code is not well enough. It should be written using the best practices. This article Best Practices in database programming  I will try to explain the disadvantages of … Continue reading

Posted in SQL Advanced, SQL Best Practices, SQL Server | Tagged | 32 Comments

RIGHT() function in SQL Server

SQL Server – RIGHT () function Right():- This function returns the specified number of characters from the Right part of the given character string. Syntax:- Select RIGHT ( character_expression , integer_expression ) For example, the below query will return two characters … Continue reading

Posted in SQL Basic, SQL Functions, SQL Server | Tagged | 30 Comments

LEFT() function in SQL Server

LEFT() function in SQL Server Left() Function  This function returns the specified number of characters from the left part of the given character string. Syntax Select LEFT ( character_expression , integer_expression )For example, the below query will return two characters … Continue reading

Posted in SQL Basic, SQL Functions, SQL Server | Tagged | 31 Comments