ComputerScienceExpert

(11)

$18/per page/

About ComputerScienceExpert

Levels Tought:
Elementary,Middle School,High School,College,University,PHD

Expertise:
Applied Sciences,Calculus See all
Applied Sciences,Calculus,Chemistry,Computer Science,Environmental science,Information Systems,Science Hide all
Teaching Since: Apr 2017
Last Sign in: 10 Weeks Ago, 5 Days Ago
Questions Answered: 4870
Tutorials Posted: 4863

Education

  • MBA IT, Mater in Science and Technology
    Devry
    Jul-1996 - Jul-2000

Experience

  • Professor
    Devry University
    Mar-2010 - Oct-2016

Category > Programming Posted 09 May 2017 My Price 8.00

Write sql statements

Q.1.

Write sql statements to do the following:

Write SQL to create a CURSOR that returns single prod_id value from the Products table

Q.2.

Write a sql statements to do the following:

Write SQL code to create a CURSOR that LOOPS through the Customers table and prints the cust_name column for each record in the table

Q.3.

Write a sql statements to do the following:

1. DROP Customers2 table if it exists

2. Make copy of Customers table. Name it Customers2

3. Alter Customers2 table to set cust_id as PRIMARY KEY. Call it PK_Customers2

Q.4.

Write SQL code to: 

1. DROP Orders cust_id foreign key constraint

2. Alter Order table to set cust_id as FOEIGN KEY. Call it FK_Orders_Customers

Q.5.

Write sql statements to do the following

Write SQL code to ADD Check constraint on cust_country in Customers table. Check to make sure value  in country column equals to "UAE."

Q.6.

Write sql statements to do the following:

Write SQL to modify Customers table to SET 'CA' as the DEFAUALT for cust_state column.

Q.7.

Write sql statements to do the following:

Write SQL to modify Customers table to CREATE INDEX on cust_state. Name the INDEX IX_Cust_State

Q.8.

i will attache the screenshot for question 8

Q.9.

Write sql statements to do the following:

Write sql to create a trigger on Vendors table named trg_InsertVendor. The trigger should execute on the INSERT event. On INSERTING a record in the Vendors table trigger should PRINT message "New Vendor added." 

Q.10.

Write sql statements to do the following:

Write sql to create a trigger on Customers table named trg_UpdateCustomer. The trigger should execute on the UPDATE event. On UPDATING a record in the Customers table, trigger should SET the State field to UPPER case. 

Answers

(11)
Status NEW Posted 09 May 2017 03:05 AM My Price 8.00

-----------

Not Rated(0)