What are the methods used to protect against sql injection attack?



What are the methods used to protect against sql injection attack?..

Answer / Tarun Kumar Jaswani

There are several methods to protect against SQL Injection attacks:
1. Parameterized Queries: Using prepared statements or parameterized queries with placeholders for user input.
2. Stored Procedures: Wrapping database code in stored procedures and executing them instead of executing raw SQL code directly.
3. Input Validation: Checking user input against a set of expected values or patterns to ensure it is safe.
4. Least Privilege Principle: Granting users the least amount of permissions necessary for their job role.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More SQL Server Interview Questions

how can you move the master database

1 Answers   IBM,


what is the difference between delete table and truncate table commands? : Sql server database administration

1 Answers  


If we use where clause in the left outer join then how the query would behave/act?

1 Answers  


Describe in brief authentication modes in sql server.

1 Answers  


i want to create procedure for create table in sql server 2005 for example create procedure create_table @table varchar(20) as create @table( id int, name char(20) ) but it will get error what is solution?

5 Answers   Aptech,


What will happen if a column containing char type data is changed to the nchar data type?

1 Answers  


What is the disadvantages of index?

3 Answers   TCS,


Explain important index characteristics?

1 Answers  


Explain trigger and trigger types?

1 Answers  


How to drop an existing schema in ms sql server?

1 Answers  


How to include date and time values in sql statements?

1 Answers  


What is the Difference beween sql server 2005 and sql server 2008

3 Answers   CMC, Hitech,


Categories