You are currently viewing transact sql linkedin answers
t-sql linkedin assessment answers_theanswershome

transact sql linkedin answers

1. What is the result of this statement?

SELECT FLOOR(-1234.321) ;

  • -12343
  • -1234
  • -1235
  • 1234.321

2. What is an example of a DDL command in SQL?

  • DELETE
  • MERGE
  • DROP
  • TRUNCATE TABLE

3. You created the two tables below. Later, you decide that you want the database to remove all books from the Books table if the related publisher is deleted from the Publishers table. What command should you run?

4. Which query shows the first name, department, and team of all students with the two lowest points?

5. You need to create a simple database backup in the server's Z: Backups directory. Which query should you use?

6. Which statement could you use to select a random student from this table?

7. Suppose you want to have the name of a transaction called myTransaction recorded in the transaction log. Which statement represents the best way to accomplish this?

  • BEGIN TRAN myTransaction WITH LOG;
  • BEGIN TRAN myTransaction BEGIN LOG;
  • BEGIN TRAN WITH MARK myTransaction;
  • BEGIN TRAN myTransaction WITH MARK;

8. Given a table with the following structure, which query will not return the lowest grade earned by any student?

CREATE TABLE Students (
StudentName varchar(50),
Grade int
);

9. What is the result of this query?

SELECT 123+'123' AS Result;

  • 123123
  • 246
  • 123’123′
  • error

10. Which statement creates a new database schema named Sales and establish Sharon as the owner?

  • ALTER USER Sharon SET SCHEMA Sales;
  • CREATE SCHEMA Sales AUTHORIZATION Sharon;
  • ALTER USER Sharon WITH DEFAULT SCHEMA = Sales;
  • CREATE SCHEMA Sales SET OWNER Sharon;

11. Your database currently has a table called Inventory in the Warehouse schema. You need to move the table to the Products schema. Which query accomplishes this goal?

  • ALTER SCHEMA Products TRANSFER Warehouse. Inventory;
  • ALTER SCHEMA Warehouse ADD TABLE Inventory;ALTER TABLE Warehouse. Inventory ADD SCHEMA Products;
  • ALTER TABLE Warehouse. Inventory TRANSFER Products.Inventory;

12. Given a table with the following structure, which query returns all student names with the highest grade?

CREATE TABLE Students (
StudentName varchar (50) ,
Grade int
);

13. You need to remove all data from a table named Products. Which query fully logs the removal of each record?

14. You need to find all students that are not on the Chemistry Cats team Which query does not work for this task?

15. You need to write a query that returns all products that have a SerialNumber ending with "10 3". Which WHERE clause should you use to fill in the blank in this query?

SELECT ProductID, ProductName, SerialNumber
FROM Products
_______ ;

Leave a Reply