You must Sign In to post a response.
  • Category: ASP.NET

    Sql Interview question for 2.5 year .net developer


    Are you searching for SQL interview questions? Get tips from here.



    I am preparing for interview.I have 2.5 year exp in .net. Can anybody tell me interview question ask about sql for 2.5 year experienced person?
  • #724519
    Hi,

    Check these links

    http://www.dotnetspider.com/resources/1827-SQL-Server-Interview-Questions.aspx

    http://www.dotnetspider.com/resources/43063-SQL-Interview-Questions.aspx

    Below are some of the questions withs answers

    1. Which TCP/IP port does SQL Server run on?
    SQL Server runs on port 1433 but we can also change it for better security.

    2. From where can you change the default port?
    From the Network Utility TCP/IP properties. Port number.both on client and the server.

    3. Can you tell me the difference between DELETE & TRUNCATE commands?
    Delete command removes the rows from a table based on the condition that we provide with a WHERE clause. Truncate will actually remove all the rows from a table and there will be no data in the table after we run the truncate command.

    4. Can we use Truncate command on a table which is referenced by FOREIGN KEY?
    No. We cannot use Truncate command on a table with Foreign Key because of referential integrity.

    5. What is the use of DBCC commands?
    DBCC stands for database consistency checker. We use these commands to check the consistency of the databases, ie maintenance, validation task and status checks.

    6. Can you give me some DBCC command options?(Database consistency check)
    DBCC CHECKDB - Ensures that tables in the db and the indexes are correctly linked and DBCC CHECKALLOC - To check that all pages in a db are correctly allocated. DBCC SQLPERF - It gives report on current usage of transaction log in percentage. DBCC CHECKFILEGROUP - Checks all tables file group for any damage.

    7. What command do we use to rename a db?
    sp_renamedb 'oldname' , 'newname'

    8. Well sometimes sp_reanmedb may not work you know because if some one is using the db it will not accept this command so what do you think you can do in such cases?
    In such cases we can first bring to db to single user using sp_dboptions and then we can rename that db and then we can rerun the sp_dboptions command to remove the single user mode.

    9. What is the difference between a HAVING CLAUSE and a WHERE CLAUSE?
    Having Clause is basically used only with the GROUP BY function in a query. WHERE Clause is applied to each row before they are part of the GROUP BY function in a query.

    10. What do you mean by COLLATION?
    Collation is basically the sort order. There are three types of sort order Dictionary case sensitive, Dictionary - case insensitive and Binary.

    Thanks & Regards,
    Mahesh Durgam

  • #724525
    Thanks Mahesh....

  • #724547
    Hi Pinky,

    Refer one of my resource answered by experts.This will surely help you...

    http://www.dotnetspider.com/resources/44740-Interview-Questions.aspx

    "Enjoy the World of IT"

    Ranipriya

  • #724551
    Thanks Mahesh....


  • This thread is locked for new responses. Please post your comments and questions as a separate thread.
    If required, refer to the URL of this page in your new post.