If we have enabled line number in SQL Server management studio for query text, It will very useful to find quickly where is the error for a long SQL script. Hare is the steps to enable Line Numbers In SQL Server Management Studio ( SSMS).
Open SQL Server Management studio and Go to Tools > Options
In the Options dialog box navigate the Text Editor, Expand the Text Editor > Transact-SQL > General.
In the preview panel Check "Line Number" and than click on OK. Now, when you will open a new query window than Line Numbers will be displayed.