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.

Online Test MS SQL Server 2000

  1. desc myTable

  2. desc table myTable

  3. sp_columns myTable

  4. None of the above

  5. Using either option a or c

Answer: Answer is d
Further Reading:

Useful resources, Information Schema Views


  1. select * from Pers where joining_date from '1/1/2005' to '1/2/2005', job= 'Analyst' or 'clerk' or 'salesman'

  2. select * from Pers where joining_date between '1/1/2005' to '1/2/2005', job= 'Analyst' or job= 'clerk' or job= 'salesman'

  3. select * from Pers where joining_date between '1/1/2005' and '1/2/2005' and (job= 'Analyst' or 'clerk' or 'salesman')

  4. None of the above

Answer: Answer is d

Employee

---------

Empno

Employeename

Salary

Deptno

Department

---------

Deptno

Departname

  1. Select departname from department where deptno in (select deptnofrom employee group by deptno having count(*) > 100);

  2. Select departname from department where deptno in (select count(*)from employee group by deptno where count(*) > 100);

  3. Select departname from department where count(deptno) > 100;

  4. Select departname from department where deptno in (select count(*)from employee where count(*) > 100);

Answer: Answer is a
Further Reading:

Other option (except a) will not execute due to error in the statement. Useful resources, SQL basic queries, query fundamental, HAVING Clause, COUNT, SQL IN


ProductID
ProductName
CurrentStock
MinimumStock

Two possible queries are: (a)select * from products where currentStock > MinimumStock + 50

(b)select * from products where currentStock - 50 > MinimumStock

  1. (a) is correct

  2. (b) is correct

  3. (a) and (b) both are correct

  4. (a) and (b) both are incorrect

Answer: Answer is d

  1. Optimistic locking is a locking scheme handled by the server, whereas pessimistic locking is handled by the application developer

  2. Pessimistic locking is a locking scheme handled by the server, whereas optimistic locking is handled by the application developer

Answer: Answer is a

  1. Read Uncommitted

  2. Read Committed

  3. Repeatable Read

  4. Serializable

Answer: Answer is d
Further Reading:

Useful resources, Isolation Levels


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 which Authors have written at least 1 book with a popularity rating of less than 5?

  1. select authorname from authors

           where authorid in (select authorid from books where popularityrating<5)
  2. select authorname from authors

           where authorid in (select authorid from books where popularityrating<=5)
  3. select authorname from authors

           where authorid in (select BookId from books where popularityrating<5)
  4. select authorname from authors

           where authorid in (select authorid from books where popularityrating in (0,5))
Answer: Answer is a

rollno        int 
name          varchar(20) 
course        varchar(20) 

What will be the query to display the courses in which the number of students enrolled is more than 5?

  1. Select course from students where count(course) > 5;

  2. Select course from students where count(*) > 5 group by course;

  3. Select course from students group by course;

  4. Select course from students group by course having count(*) > 5;

  5. Select course from students group by course where count(*) > 5;

  6. Select course from students where count(group(course)) > 5;

  7. Select count(course) > 5 from students;

  8. None of the above

Answer: Answer is d

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 which is the most popular book written in French?

  1. select bookname from books

           where language='French' and popularityrating = (select max(popularityrating) from books where language='French')
  2. select bookname from books

           where language='French' and popularityrating = (select max(popularityrating) from books Having language='French')
  3. select bookname,max(popularityrating) from books

           where language='French' and max(popularityrating)
  4. select bookname,max(popularityrating) from books

           where language='French' having max(popularityrating)
Answer: Answer is a

  1. It returns the difference between parts of two specified dates

  2. It takes three arguments

  3. It returns a signed integer value equal to second date part minus first date part

  4. It returns a signed integer value equal to first date part minus second date part

Answer: Answer is d
Further Reading:

Useful resources, DATEDIFF


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.

;