Open in app

Sign In

Write

Sign In

Rajanand Ilangovan
Rajanand Ilangovan

457 Followers

Home

About

Published in SQL Server

·May 7, 2022

How to identify similarly pronounced words in SQL server?

There are two functions in SQL Server that are used to identify whether the two strings are pronounced similarly or not. They are SOUNDEX() - This function takes a string as parameter and returns a four-character code. This code is called as Soundex. …

Sql

2 min read

How to identify similarly pronounced words in SQL server?
How to identify similarly pronounced words in SQL server?
Sql

2 min read


Published in SQL Server

·Apr 10, 2022

What happens to the records inserted into a table variable, if the transaction rollback?

DECLARE @People TABLE (first_name VARCHAR(50), age int); BEGIN TRAN INSERT INTO @People VALUES ('John', 25); INSERT INTO @People VALUES ('Daniel', 30); ROLLBACK SELECT * FROM @People; Answer: The records inserted into a table variable will not be affected by the transaction rollback. Reference: Brent Ozar If you like this SQL interview question, you may also like the below interview question and answers.

Sql Server

1 min read

What happens to the records inserted into a table variable, if the transaction rollback?
What happens to the records inserted into a table variable, if the transaction rollback?
Sql Server

1 min read

What happens to the records inserted into a table variable, if the transaction rollback?

DECLARE @People TABLE (first_name VARCHAR(50), age int);
BEGIN TRAN
INSERT INTO @People VALUES ('John', 25);
INSERT INTO @People VALUES ('Daniel', 30);

ROLLBACK

SELECT * FROM @People;

Answer:

The records inserted into a table variable will not be affected by the transaction rollback.

Reference: Brent Ozar

If you like this SQL interview question, you may also like the below interview question and answers.

  • What happens to the variable value set during the transaction, if its rollback?
  • How to generate permutations in SQL?
  • How to do reciprocal in SQL?
  • How to find account balance (running total) in SQL?

Originally published at blog.rajanand.org.

--

--


Published in SQL Server

·Apr 5, 2022

What happens to the variable value set during the transaction, if its rollback?

DECLARE @my_age INT = 20; BEGIN TRAN SET @my_age += 30; ROLLBACK; SELECT @my_age; Answer: Even though the transaction is rolled back, the value set to the variable remains same. Changes to variables aren’t affected by the rollback of a transaction. Reference: Microsoft docs & Brent Ozar If you like this SQL interview question, you may also like the below interview question and answers. How to do reciprocal in SQL?

Sql Server

1 min read

What happens to the variable value set during the transaction, if its rollback?
What happens to the variable value set during the transaction, if its rollback?
Sql Server

1 min read

What happens to the variable value set during the transaction, if its rollback?

DECLARE @my_age INT = 20;

BEGIN TRAN
SET @my_age += 30;
ROLLBACK;

SELECT @my_age;

Answer:

Even though the transaction is rolled back, the value set to the variable remains same.

Changes to variables aren’t affected by the rollback of a transaction.

Reference: Microsoft docs & Brent Ozar

If you like this SQL interview question, you may also like the below interview question and answers.

  • How to do reciprocal in SQL?
  • How to generate permutations in SQL?
  • How to find account balance (running total) in SQL?
  • What happens to the records inserted into a table variable, if the transaction rollback?

Originally published at blog.rajanand.org.

--

--


Published in SQL Server

·Feb 22, 2022

How to sort result set in custom order in SQL?

Question: Write a SQL query to display the result in custom sort order. Answer: If you need to display the result in ascending or descending order you can achieve the same directly using asc or desc keyword in order byclause. …

Sql

1 min read

How to sort result set in custom order in SQL?
How to sort result set in custom order in SQL?
Sql

1 min read


Published in SQL Server

·Feb 14, 2022

How to properly install SQL Server?

Originally published at blog.rajanand.org. In this tutorial, We will install the SQL Server 2019 developer edition in windows 10. This developer edition is a full-featured free edition, licensed to use in a non-production environment for development and test database. The installation step will be mostly same for the different versions…

Sql Server

3 min read

How to properly install SQL Server?
How to properly install SQL Server?
Sql Server

3 min read

Rajanand Ilangovan

Rajanand Ilangovan

457 Followers

Business Intelligence Developer. https://link.rajanand.org/bio

Help

Status

Writers

Blog

Careers

Privacy

Terms

About

Text to speech