News:

SQL Table To C# Entity Model ConverterEntity Model (Class Properties) to SQL Table ConverterIf you encounter any trouble visiting our site, please contact us.

Mcq Answers for SQL Server

Marketing, Designing, production, Packing

What will be the result of the following query?

select * from table where department < 'marketing';
  1. The query will return "Designing, Packing"

  2. The query will return "Designing, production, Packing"

  3. The query will return "packing"

  4. Strings cannot be compared using < operator

  5. The query will return "Designing"

Answer: Answer is e

Books

------

BookId

BookName

AuthorId

SubjectId

PopularityRating       (the popularity of the book on a scale of 1 to 10)

Language               (such as French, English, German etc)

 

 

Subjects

---------

SubjectId

Subject   (such as History, Geography, Mathematics etc)

 

 

Authors

--------

AuthorId

AuthorName

Country

What is the query to determine how many books, with a popularity rating of more than 7, have been written on each subject?

  1. select subject,count(*) as Books from books,subjects

           where books.popularityrating > 7

           group by subjects.subject

  2. select subject,count(*) as Books from books,subjects

           where books.authorid=subjects.authorid and books.popularityrating > 7

           group by subjects.subject

  3. select subject,count(*) as Books from books,subjects

           where books.subjectid=subjects.subjectid and books.popularityrating = 7

           group by subjects.subject

  4. select subject,count(*) as Books from books,subjects

           where books.subjectid=subjects.subjectid and books.popularityrating > 7

           group by subjects.subject

Answer: Answer is a

  1. Tables once created cannot be modified to add columns

  2. Constraints can only be given while table creation

  3. One can easily create a table from a given table

  4. When a table is created from another table, all the constraints are copied as well

  5. The width of the columns cannot be modified

  6. Columns cannot be removed from a table

Answer: Answer is c

  1. Data Flow Chart

  2. Flow Chart

  3. Directed Chart

  4. Entity-Relationship Diagram

  5. None of the above

Answer: Answer is d

  1. A primary key constraint can be disabled

  2. Information about the constraints on a table can be retrieved from the data dictionary

  3. Information about the columns on which the constraints have been applied can be retrieved from the data dictionary

  4. There can be only one unique key in a table

  5. If a column has null values then the not null constraint cannot be applied to that column

  6. There can be more than one primary key

Answer: Answer is d, f

  1. Schema

  2. Instance

  3. Table

  4. Cluster

  5. View

  6. Index

  7. None of the above

Answer: Answer is b

1    Create table Pers

2    (EmpNo Number(4) not null,

3    EName Char not null,

4    Join_dt Date not null,

5    Pay Number)

Which line contains an error?

  1. 1

  2. 2

  3. 3

  4. 4

  5. 5

Answer: Answer is b

  1. Select
  2. order by
  3. where
  4. having
  5. group by
  1. 1,2,3,4,5

  2. 1,3,5,4,2

  3. 1,3,5,2,4

  4. 1,3,2,5,4

  5. 1,3,2,4,5

  6. 1,5,2,3,4

  7. 1,4,2,3,5

  8. 1,4,3,2,5

Answer: Answer is b
Further Reading:

The order should be like this select>where>group by>having>order by. Useful resources, SQL basic queries, query fundamental, HAVING Clause


  1. A table is a multiset of rows

  2. A table is a two-dimensional array of rows and columns

  3. A table is always dependent on other tables

  4. A third normal form table is a table free of redundant data

  5. A table must have a primary key

Answer: Answer is b, d

  1. Returns the remainder after division

  2. Modifies the column definition

  3. Modifies the definition of a table

  4. None of the above

Answer: Answer is a
Further Reading:

Useful resources,Mod


Advertisement

BCS Preparation now even more easy. ReadBD is the place where you can find all kind of resources to be successful in BCS,Bank,Islami Bank exam and interview.

Looking for job. Try JobLoader- First ever job search engine in Bangladesh. All open bd jobs now a single mouse click away.

;