SQL Interview Question And Answer | SQL Interview Question And Answer for Fresher | SQL Server | Set-06

1.What is a Linked Server?
 Ans: Linked Servers is a concept in SQL Server by which we can add other SQL Server to a Group and query both the SQL Server dbs using T-SQL Statements. With a linked server, you can create very clean, easy to follow, SQL statements that allow remote data to be retrieved, joined and combined with local data. Stored Procedure sp_addlinkedserver, sp_addlinkedsrvlogin will be used add new Linked Server.

2.What is a constraint? What are the different constraints available?
 Ans: Constraint is defined as imposing predefined rules on table columns

          There mainly two types of constraints. Those are
           1. Column constraint:  It is specified as part of a column definition and applies only to that column
           2. Table constraint: It is declared independently from a column definition and can apply to more than one column in a table
           These constraints must be used when constraint is applied for more than one column of a table

3.How do we suppress (avoid) duplicate rows in select statement?
 Ans: Distinct is a key word. It is used to suppress duplicate rows in select statement output.

4.What is the difference between count() and count(*)?
Ans: Count () counts  the non-null values  in a column and where as count(*) counts rows of query results and does not depend on the presence or absence of null values in a column. If there are no rows, it returns a value of zero

5.What are the different clauses available in SQL?
 Ans: There are 4 clauses. Those are
            1. where
            2. group by
            3. having
            4. order by

6.How do we use ‘group by’ clause?
 Ans: The group by clause is used in select statement to collect data across multiple records and group the results by one or more columns.

7.How is ‘having’ clause is used?
 Ans: The having clause is used along with the group by clause. The having clause can be used to select and reject row groups. The having clause specifies condition for groups.

8.How many types of triggers are there?
Ans:  1. Insert
          2. Delete
          3. Update
          4. Instead of

9.What is Collation?
 Ans: Collation refers to a set of rules that determine how data is sorted and compared. Character data is sorted using rules that define the correct character sequence, with options for specifying case sensitivity, accent marks, kana character types and character width.

10.What are the authentication modes in SQL Server? How can it be changed?
 Ans: Windows mode and Mixed Mode - SQL and Windows.

         To change authentication mode in SQL Server click Start, Programs, Microsoft SQL Server and click SQL Enterprise Manager to run SQL Enterprise Manager from the Microsoft SQL Server program group. Select the server then from the Tools menu select SQL Server Configuration Properties, and choose the Security page.
Previous Next


:: Click the links below for similar type Questions and answers ::

>

0 comments:

Post a Comment

 
Design by Wordpress Theme | Bloggerized by Free Blogger Templates | coupon codes