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

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

3 Answers   Apple,


How many max. conditions can b written under the WHERE clause? Like select * from [tabnam] WHERE (cond1...or..cond2....or...cond3...and.....so on.....??? (upto how much extent))?????

3 Answers   SAP Labs,


how can do you the system monitoring?

1 Answers  


What are the dis_advantages of stored procedures, triggers, indexes?

0 Answers  


select empid empname from employee What is the result for the about query?

4 Answers  






What is the difference Between Sql-server 2000 & 2005

3 Answers   Value Labs, Wipro,


how to connect sybase to sql server 2005?.

1 Answers   ABC,


Security Question- SQL DBA exparts, need your help...

3 Answers  


what is difference between primary key and Unique

8 Answers  


How to perfor If the table running time is taking 2hours and table is having 10 rows in it?

1 Answers  


what is the use of database index(apart from the last searching of records) and what is the use of composite key?

1 Answers  


what is syntex second or third highest salary. thanks & Regards Dhirendra sinha

7 Answers  






Categories