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

i use few third party softwares. they r all having their own databases . but the data is repeated in all these databases - say a person is in all the three databases, but his name is stoared in diff format in all databases i want to create a centralised database ,and i dont want to re-enter the records . using the exisating records how can i build a centralised database?

1 Answers   Fidelity,


Does sql server use t sql?

0 Answers  


Is mysql better than sql server?

0 Answers  


Which is better statement or preparedstatement?

0 Answers  


What is the difference between a Local temporary table and a Global temporary table? How is each one used?

2 Answers   HCL,


Explain the properties of a relational table?

0 Answers  


What is database dimension? : sql server analysis services, ssas

0 Answers  


What the different topologies in which replication can be configured?

0 Answers  


What does null mean?

0 Answers  


what is a cursor and what is its use?

2 Answers   L&T,


How to drop an existing user defined function in ms sql server?

0 Answers  


What is a db view?

0 Answers  


Categories