in stored procedure cant i set set ANSI_NULLS OFF
instead of using (first_name IS NULL)
in one of my query...
also i want to know how can i debug stored procedure and how can i see result generated by stored procedure ...like for normal query i get the option sql
written tag.......but how can i achieve this for stored procedure....please elaborate me on this too
basically i want to know, following is my exact query
SELECT student_id, first_name, last_name, user_name, password, father_name, DOB, gender, local_address, permanent_Address, phone, mobile, email, college_id,
course_id, branch_id, highschool_passout_year, highschool_percentage, ssc_passout_year, ssc_percentage, passing_year_higher, graduation_percentage,
graduation_passout_year, post_g开发者_Python百科raduation_percentage, post_graduation_passout_year, diploma_percentage, diploma_passout_year, number_of_ATKT,
current_backlog, gapin_education, sem1P, sem2P, sem3P, sem4P, sem5P, sem6P, sem7P, sem8P, total_sem_percentage, total_year_percentage, flag, image,
native_place, high_school_board, ssc_board, diploma_university, graduation_university, post_graduation_university, training_details, Project_Work, Skills,
extra_curricular, blood_group, profile_updated, year_of_admission, security_question, security_answer, admission_year, passing_year, enrollment_no,
first_year_percent, second_year_percent, third_year_percent, final_year_percent, current_degree_percent, year1P, year2P, year3P, year4P, roll_no,
diploma_details
FROM tbl_students
WHERE (first_name = 'Rupesh' COLLATE Latin1_General_CS_AS) OR
(first_name IS NULL)
right now i am explicitly checking for first name is null, but i want to know if i set SET ANSI off then can i remove the first_name=null from my query and still i will get the correct result
If you set ansi nulls off then you can test for null values using first_name = null
As for debugging you can execute the query to see its results in SQLServer Management studio, stored procedures are stored per database under programmability | stored procedures
If you are running a script rather than a single statement you can output to the messages tab of the results pane using the print command
精彩评论