Interview Question

  • Dear Experts,

    Is it possible to check whether table has index,stored procedure,views,triggers,primary key in the single query?

    or else give seprate query no issues......

  • I have to give you 2 points for honesty in saying that it's an interview question in the title of this post. However, there are two traits that people look for in a DBA or an SQL Developer... knowledge and the ability to use Books Online to find out what you don't know.

    This question is knowledge that everyone applying for an SQL Server related job should know right of the top of his/her head. Since you don't know it, I recommend you exercise the other trait people look for. Search Books Online for your answer. Because of your honesty, I'll help you narrow it down a bit. Lookup things that begin with SP_ and consume the knowledge... it will make you a better DBA or SQL Developer.

    If you don't want to take the time to do that then, perhaps, you're not quite right for the job because being a DBA or SQL Developer requires the constant investment of time to learn new things and practice much like a concert pianest must practice every single day.

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.

    Change is inevitable... Change for the better is not.


    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)

  • There is a mechanism, and after you look it up as Jeff is prompting, you need to know that it's not 100% accurate all the time.

    "The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood"
    - Theodore Roosevelt

    Author of:
    SQL Server Execution Plans
    SQL Server Query Performance Tuning

  • Pls refer any books with good authour

  • venktsrinivas.gv (1/1/2010)


    Pls refer any books with good authour

    On what exactly? There are lots of good books with good authors on all sorts of aspects of SQL.

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • venktsrinivas.gv (1/1/2010)


    Pls refer any books with good authour

    Already did that... see Books Online. As a side bar, step one on finding the answer to any interview question for DBA's or SQL Developers is... do you own research. It's THE necessary skill.

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.

    Change is inevitable... Change for the better is not.


    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)

  • venktsrinivas.gv (1/1/2010)


    Pls refer any books with good authour

    Is it possible that you're confused by the "hint "Books Online"?

    If so: Books Online (aka BOL) is the help system usually installed together with SQL Server.

    You can also download it.

    But I truly hope I misunderstood your question...



    Lutz
    A pessimist is an optimist with experience.

    How to get fast answers to your question[/url]
    How to post performance related questions[/url]
    Links for Tally Table [/url] , Cross Tabs [/url] and Dynamic Cross Tabs [/url], Delimited Split Function[/url]

  • hi

    there is a view sys.objects which will return you all the information about trigger ,proc , key ,view , function etc which is dependent on particular table.

    all you have to do is specify table name , and type of objects you are looking for in where clause 🙂

    thanks

    chandan

Viewing 8 posts - 1 through 7 (of 7 total)

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