Skip to main content

Blog

SQL - Find Duplicate Records

The article describes how to find duplicate records in a table with SQL. 

General syntax for the SQL query for finding duplicated rows in a table is:

SELECT [field_name], COUNT([field_name])
FROM [table_name]
GROUP BY [field_name]
HAVING (COUNT([field_name]) > 1)

For example, if we want to find duplicate records with SQL in Students table based on a student's name we could use:

Entity Framework - ESQL Literals

This article describes Entity SQL support for literals.

SQL Server - How to Disable / Enable All Triggers

Working on a software project can be time consuming and it is useful if any task could be shortened or automatized.

If you often work on SQL Server you might come across a requirement to disable or enable all triggers in database.

Here are instructions how you can achiveve that:

Disable all triggers in database

exec sp_msforeachtable @command1 = 'ALTER TABLE [table_name] DISABLE TRIGGER ALL'

Enable all triggers in database

exec sp_msforeachtable @command1 = 'ALTER TABLE [table_name] ENABLE TRIGGER ALL'

How to Recover Windows Boot After Deleting Linux Partitition

Many of you tried dual-booting with Linux and Windows installation and maybe deleted the Linux partition. I'm sure that you still remember pain when you realized that Windows wouldn't boot anymore.

The solution for this situation is to reinstall Windows boot loader. Here is how to fix it:

PHP - How to Get User IP Address

We share with you the useful PHP function for getting user's IP address you could use in your projects.

The easiest way for obtaining visitor's IP address is using the code line: