select statement query in a procedure

  • Hi there,

    I am new to sql server. I have the follwoing question.

    What is the difference between 'select top 100 percent' and a tablename AND just giving the 'select and table name'. The latter will anyway get all records.

    Thanks in advance

  • If you have a view then you can only use ORDER BY statements if you use the SELECT TOP 100 PERCENT version.

  • No. Its is not a view. Its a table that the stored procedure is querying, and if I try just the table name (and not the top 100...) with the order by clause it still works

  • Both are same. If you check with Show Execution Plan in QA it dont show any diffrence between two Queries. I guess you generated the Query from the Wizard.

    --Jeswanth

    --------------------------------

Viewing 4 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic. Login to reply