User Name:


User Email:




This information will only be saved for the purposes of communicating with those who have provided this information voluntarily regarding our services.We will never sell your name or email address to anyone.
© 2017 - First Crazy Developer (Abhishek Kumar)
  

crazydeveloper How to Find and Replace Values in All Tables and All Text Columns in SQL Server

Problem 1:

We have a tables (SQL Server) which references paths (with specific name/ value), but now the path is going to change. In the path column, we have many records and we need to change just a portion (name/ value) of the path, but not the entire path. And we need to change the same string to the new one, in every record.

How can we do this with a simple update?


Problem 2:

We have read about a SQL injection attack where text is inserted and this could be a good way to remove the offending text.

Read more »
08 August 2015

crazydeveloper Magic of Sql Server with Update query

Magic of SQL Server

Today we will talk about magic of Sql Server. There is a scenario, we need to swap value between two columns, what will be sql query for that?

Look the following sql query and you will surprised that there is a simple way to do that in Sql without using third variable.

update tablename

set firstName=lastName,lastName=firstName


Tell me above sql query will be execute or we will get error.

Read more »
24 June 2015

crazydeveloper How can we get last Identity value in SQL Server

When we insert data in table in SQL, in that case we need to get the reference of new inserted row, how can we do that?

There are some internal functionality in SQL Server through which we can get that value from SQL Server.

1.)  @@IDENTITY

2.)  SCOPE_IDENTIT 

3.)   IDENT_CURRENT

Read more »
06 June 2015

Page 1 of 1

Become a Fan