Question

In: Computer Science

) Write queries for the following. Include screenshots of the queries and the outputs. Create a...

) Write queries for the following. Include screenshots of the queries and the outputs.

  1. Create a procedure named DisplayInfo which takes customer name as a parameter and displays information of that customer. (database – sql_store)

Solutions

Expert Solution

First I created a DB named sql_store.

In that I created a table named Customer.

I used schema for Customer table is as below :

Inserted data in Customer table is as below :

Now, PROCEDURE DisplayInfo which takes customer name as parameter and displays it's information is as below:

CREATE PROCEDURE DisplayInfo @name varchar(25)
AS
SELECT * FROM Customer WHERE CustomerName = @name

When we run EXEC query as

EXEC DisplayInfo @name = 'ABC';

It will give output as below :

NOTE : I used SSMS to run this procedure.


Related Solutions

Please comments this C++ code and show screenshots of the outputs main.cpp #include<iostream> #include<vector> #include<string> #include"BST.h"...
Please comments this C++ code and show screenshots of the outputs main.cpp #include<iostream> #include<vector> #include<string> #include"BST.h" #include"BST.cpp" using namespace std; std::vector<std::string> tokenize(char line[]) {    std::vector<std::string> tok;        std::string word = "";        for (int i = 0; i < strlen(line); i++)        {            if (i == strlen(line) - 1)            {                word += line[i];                tok.push_back(word);                return tok;       ...
For Assignment 2, submit a word or pdf file with the SQL queries along with screenshots...
For Assignment 2, submit a word or pdf file with the SQL queries along with screenshots of the outputs. (It is ok if the whole problem cannot be answered, if possible, I just would like an idea of how to begin, thanks in advance!) 9. Write a query to count the number of invoices. 10. Write a query to count the number of customers with a balance of more than $500. 11. Generate a listing of all purchases made by...
projectOne (Please be sure to include screenshots of the test runs for all programs) A. write...
projectOne (Please be sure to include screenshots of the test runs for all programs) A. write a program the computes nx and store the result into y You can use y = Math.pow( Mantissa, exponent) Requirements: Besides main() your program must have one method with two parameters, one double and one int n and x are positive numbers read from the keyboard if the user makes an entry that does not meet this criteria, the user must be given to...
Write a R-script to (and show the outputs of your code) (a) Create a sequence of...
Write a R-script to (and show the outputs of your code) (a) Create a sequence of numbers starting at 3.5 and ending at 10.7 with increments of 0.79. Find the variance and mean of those numbers. And finally sort the vector in a decreasing manner (b) Create a 3 different 3 by 3 matrices such that each of the numbers 1,2,...,9 appear exactly once (Sudoku style) in each of the matrices.
Create a table with name “S_YOURStudentID” with the following fields with required constraints. Screenshots are to...
Create a table with name “S_YOURStudentID” with the following fields with required constraints. Screenshots are to be attached.                                                                                               For example, if your botho student id is 1212121, your table name should be “S_1212121”.                                   Student id Student Name Age Gender City Course name Module Name Internal mark 1 Internal mark 2 Internal mark 3 Total internal mark Insert minimum 10 records/rows to the table. Input the data based on Question 5. Screenshots are to be attached.                                                                                                                              Create two users...
OPERATING SYSTEMS HOMEWORK: PLEASE CODE IN JAVA with comments & POST SCREENSHOTS OF OUTPUTS SCAN This...
OPERATING SYSTEMS HOMEWORK: PLEASE CODE IN JAVA with comments & POST SCREENSHOTS OF OUTPUTS SCAN This algorithm is performed by moving the R/W head back-and-forth to the innermost and outermost track. As it scans the tracks from end to end, it process all the requests found in the direction it is headed. This will ensure that all track requests, whether in the outermost, middle or innermost location, will be traversed by the access arm thereby finding all the requests. This...
Screenshots from MySQL (or any other software you use) of all the tables after queries result...
Screenshots from MySQL (or any other software you use) of all the tables after queries result sorry no spam i will be reported no copy and paste i want complete answer with Screenshots no handwriting thanks for your efforts and time Using the info below, write a query SQL Using the info below to Normalize the Tables (in 3NF at least) . Using the info below toCreate the Normalized Tables and Populate them with at least 5 Rows . Using...
Write the following SQL queries and show the corresponding output of the DBMS: 1) Write an...
Write the following SQL queries and show the corresponding output of the DBMS: 1) Write an SQL statement to display all the information of all Nobel Laureate winners. 2) Write an SQL statement to display the string "Hello, World!". 3) Write an SQL query to display the result of the following expression: 2 * 14 +76. 4) Write an SQL statement to display the winner and category of all Laureate winners. 5) Write an SQL query to find the winner(s)...
Create a new SQL Developer SQL worksheet and create/run the following TWO (2) queries and save...
Create a new SQL Developer SQL worksheet and create/run the following TWO (2) queries and save your file as Comp2138LabTest1_JohnSmith100123456.sql (replace JohnSmith 100123456 with your name and student ID). Please place comment that includes your name and your student ID at the top of your script and number your queries using comments sections. Each query carries equal weight. A selection of the expected result set has been shown below for your convenience. Your output should match with this sample output....
Write the following queries using relational algebra. SHOW ALL STEPS CREATE TABLE MovieStar (msid char(3), msname...
Write the following queries using relational algebra. SHOW ALL STEPS CREATE TABLE MovieStar (msid char(3), msname char(10), title char(4), PRIMARY KEY(msid)); msid – movie star ID, msname – star’s name, title – denotes gender (“Mr.’, “Mrs.”, “Ms.”) CREATE TABLE Stars_in (msid char(3), mid char(3), contract number(9,2), duration number(2), PRIMARY KEY (msid, mid), FOREIGN KEY(msid) REFERENCES MovieStar, FOREIGN KEY(mid) REFERENCES Movie); contract – the star’s salary for the movie, duration – contract duration in months. CREATE TABLE Movie (mid char(3), mname...
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT