transact sql linkedin answers
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?
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
);
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;