Sql Statement Dbm/502

Published: 2021-06-29 07:11:49
essay essay

Category: Technology

Type of paper: Essay

This essay has been submitted by a student. This is not an example of the work written by our professional essay writers.

Hey! We can write a custom essay for you.

All possible types of assignments. Written by academics

GET MY ESSAY
DBM/502 - Database Management

Given the attached relational db tables:

1. Provide an explicit JOIN SQL statement that returns the store ID, store name, manager employee first and last name fields, manager employee grade, the city and state fields of the store. Only unique rows should be returned. Note that the 4th field in the Employee table is the employee grade field, the 2nd field in the Store table is the store name, and the 3rd field in the Store table is the manager's ID.

SELECT Store.ID, Store.SNAME, Employee.FNAME, Employee.LNAME, Employee.GRADE, Store.CITY, Store.STATE
FROM Employee INNER JOIN Store ON Employee.ID = Store.EID;

2. Without using the WHERE clause, what SQL statement should be used in the User table to only return 2 records with only the Country field and the values GB and USA in each record respectively?

SELECT DISTINCT User.COUNTRY
FROM [User];

3. Write a SQL statement to change Sally Smith's first name to Judy in the User table. It turned out that Sally was her middle name.

UPDATE User
SET FNAME = 'Judy'

Warning! This essay is not original. Get 100% unique essay within 45 seconds!

GET UNIQUE ESSAY

We can write your paper just for 11.99$

i want to copy...

This essay has been submitted by a student and contain not unique content

People also read