In this article we are going to learn save dynamic query output in a variable. For that first i need to create a table. So you can find script of creating table. Table Name : InvoiceLocations CREATE TABLE [dbo].[InvoiceLocations]( [Id]… Continue Reading →
In this article we are trying to find how many ways that we can find foreign key sql server. There are so many ways to find out but currently i am going to talking about only 3 ways. I am… Continue Reading →
declare @i int=10 while(@i<=20) begin print @i set @[email protected]+1 end I hope this code is helpful. Happy coding 🙂
In this blog i am going to write a function which returns word count in sql server. Sql server does not provide inbuilt function for calculating word count. So we have to write a custom function in sql. CREATE FUNCTION… Continue Reading →
System defined functions are provided by SQL itself.
User defined function are two type. First is Scalar and second is Table value.
What is output when we write null = null in where clause
In this article we learn how to resolve the problem while connecting local sql database. Problem: Yesterday, When i was trying to connect my local SQL server database. I found an error called “Cannot connect to PRAMODTHAKUR”. Solution: … Continue Reading →
Problem I was trying write a procedure with some logic and in that scenario have to find out that how many table contain column-name like “sales” in my database. In my view there is two solution for this may be… Continue Reading →
update NewTable set status= case status when 1 then 0 when 0 then 1 end
In this article we learn that how to delete duplicate row in sql. Let’s create a table and name it NewTable. Create table NewTable ( Name varchar(30), Age int ) Now i am going to insert some demo record in… Continue Reading →