what is meant by sql injection with example and one more
question how to catch the errors in sqlserver




Answers were Sorted based on User's Feedback



what is meant by sql injection with example and one more question how to catch the errors in sqlse..

Answer / sudheer

sql injection attacks are used to steal information from a
database from which normally not be available and /or to
gain access to an organaization 's host computers through
the computer that is hosting the database.
EXAMPLE:
select email,pwd,login_id,fullname from members where
email='x'

Now somebody does not put 'x' as the input but
puts 'x ;drop table members;' so the actual sql wich will
execute is
select email,pwd,login_id,fullname from members where
email=x;drop table members;
Think once what happens to ur database.

Is This Answer Correct ?    8 Yes 0 No

what is meant by sql injection with example and one more question how to catch the errors in sqlse..

Answer / kanan

how to catch the errors in sqlserver?

BEGIN TRY
SELECT 1/0
END TRY

BEGIN CATCH
RETURN ERROR_NUMBER()
RETURN ERROR_MESSAGE()
RETURN ERROR_LINE()
END CATCH

Is This Answer Correct ?    6 Yes 0 No

Post New Answer




More SQL Server Interview Questions

what type of indexes physically sort data?

3 Answers  


write sql program to get the detail of student in a class?

2 Answers  


Can we move Resource database from one path to another? If yes,How can we?

1 Answers   Wipro,


What are the types of backup and tell me the difference between full and differential backup?

4 Answers   CTS, TCS,


Can I recover a damaged SQL Server 2008 database with the undamaged .mdb and .ldf files?

3 Answers   Apple,






i want table name basis on column name.

5 Answers  


How to handle errors in Stored Procedures. I want to display a message to the user in the .aspx page that is calling a stored procedure in it's code behind. please help me.

2 Answers   247Customer,


i have 4 tables.. T1, T2, T3, T4.. these tables have the same structure and they store the information entered in different years.. T1 stored 2002, T2 stored 2003, T3 stored 2004 and T4 stored 2005.. i want to copy contents in T1 to T2, T2 to T3, T3 to T4 and T4 to T1.. how do i do that? Temp tables cannot be used..

4 Answers  


if we have a column (Key) in a table. and values of that column is Key 1 1 1 2 2 3 3 4 4 5 5 5 and we want to show the data after query..like.. 1(3) 2(3) 3(2) 4(2) 5(3) how many times a single term comes..

17 Answers   TCS, 3i Infotech, Rolta,


write coding for importing sql data into a word excel...

1 Answers   Oracle,


Name three version of sql server 2000 and also their differences?

1 Answers  


What are SQL Jobs, please mention the use of it and how to create them.

1 Answers   247Customer,






Categories