When ever you want to build or create dynamic SQL and when you writing condition but you do not know whether your dynamic query has where clause or not. Use where 1=1 to make sure your dynamic query has where clause
This will select all records from the mentioned table. Usually used in SQL injection to retrieve all data from Table.
when we want to retrieve all record of a table..........
I some time use 1=1 for checking sql injection attack possibilty
it shows the all records from table