Results 1 to 6 of 6
  1. #1
    Join Date
    Jul 2010
    Location
    ISHHHH
    Posts
    130

    Unanswered: Diff b/w select & declare

    just a small clarification needed in both of them a little bit confused
    WiTh Tnks & ReGaRdS
    mAtHuKuMaLi

  2. #2
    Join Date
    Jan 2007
    Location
    UK
    Posts
    11,434
    Provided Answers: 10
    SELECT is used in queries to retrieve data
    DECLARE is used to initiate variables
    George
    Home | Blog

  3. #3
    Join Date
    Jul 2010
    Location
    ISHHHH
    Posts
    130
    now it was cleared thnks
    WiTh Tnks & ReGaRdS
    mAtHuKuMaLi

  4. #4
    Join Date
    Aug 2009
    Posts
    37

    Select &Declare

    Select is used to fetch data from table
    ex: select * from tablename
    declare is used to define variables
    ex: declare @x int

  5. #5
    Join Date
    Feb 2004
    Location
    One Flump in One Place
    Posts
    14,912
    As documented in Books Online....

    The only extensions to the above:
    SELECT can also be used to assign values to variables.
    In 2008, DECLARE can also be used to assign values to variables (though with some constraints)
    Testimonial:
    pootle flump
    ur codings are working excelent.

  6. #6
    Join Date
    Jul 2010
    Location
    ISHHHH
    Posts
    130
    ooh nice to know about the both
    WiTh Tnks & ReGaRdS
    mAtHuKuMaLi

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •