1- Create table student5 as:
2- Write PL/SQL program using cursor to display student number and names who's their salary greater than 2500?
3- Update the table students to increase the salary of each customer by 300?
1)
CREATE TABLE student5 (
St_no INT(5),
St_name VARCHAR(12),
Salary NUMBER,
Age INT(2),
Major VARCHAR(10)
);
3)
UPDATE student5 SET salary = salary + 300;
NOTE: As per Chegg policy I am allowed to answer specific number
of questions (including sub-parts) on a single post. Kindly post
the remaining questions separately and I will try to answer them.
Sorry for the inconvenience caused.
The procedure is a sample and needs to be modified.
The software used is oracle 11g.
Provide screen shot of the program running.
EX:NO:7 PLISOL PROCEDURE & FUNCTION AIM To develop the package for finding the number of students under each percentage for individual courses using PLISQL procedure and function. DATABASE SCHEMA STUDENT (ST_ID, NAME, COURSECODE, COURSENAME, TOTAL MARKS, PERCENTAGE) PROCEDURE STEP 1: Start STEP 2: Create a table with table name student. STEP 3: Insert at least 4 records...
10 Exercise 2 We suppose that we have the following dataset on students (GPA: Grade Point Average): ID Name GPA Leila 3.5 7 Adel 4.2 20 Ahmed 3 13 Abir 2.7 30 Iman 3.1 21 Amna 2.7 Hedi 4.5 9 Write a C++ program that will create a binary search tree which nodes are students. The tree will be created based on the ID of students. The program will allow the user to successively do the following tasks: Display the...
Exercise 3 [12.5 marks] Given the Restaurant management system database that contains the following tables (primary keys are underlined and foreign keys are preceded with #): Customer (customerID,customerFirstName,customerLastName,customerAddress) Oreder (orderID,orderDate, #customerID,#menuItemID,#staffID) MenuItem(menuItemID, menuItemName,ingredients,type,availability) Staff(staffID, staffName, staffPhoneNumber, staffRole ) OrderPayment(paymentID,paymentAmount,#orderID,#staffID) 1) Without using DISTINCT, write the SQL query equivalent to the following one:[1.5 marks] SELECT DISTINCT menuItemName FROM MenuItem WHERE type = ‘Vegetarian’ OR availability= ‘Yes’; 2) Express the following queries in SQL: a) Find the number of orders placed by...
SQL Homework Create a single script to do all of the following. Be sure to create in such a way that it can be re-run multiple times. Create a database named homework. In this database, create three tables: Student, Course, StudentCourse - Create the Student table with the following fields in this order: studentID as an integer; do not allow empty values firstName as a variable number of characters, max 30, with a null default value lastName as a variable...
1. Create an PL/SQL anonymous block. Using a “while” loop, display on the console those rows where a quantity of shipments for a project are greater than the average quantity of shipments for that project. 2. Repeat using a FOR loop. // TABLE INFO : SHIPMENTS(SUPPLIERNO, PARTNO, PROJECTNO, QUANTITY, SHIPDATE, ARRIVEDATE)
1.Write a pl/SQL block that selects all the rows from the A2order table and prints them to screen. THIS CAN BE EASILY DONE USING AGGREGATE FUNCTIONS, BUT YOU MUST NOT USE AGGREGATE FUNCTIONS IN THIS ASSIGNMENT 2. 2.Write a pl/sql block that deletes the orders from the A2order table that were ordered after the order that has the highest order_price (Order_date will tell you when a row was entered). YOU MUST USE BULK OPERATIONS FOR THIS CODE 3. Write a...
Tables: Create table Item( ItemId char(5) constraint itmid_unique primary key, Decription varchar2(30), Unitcost number(7,2)); Create table Customer( custID char(5) constraint cid.unique primary key, custName varchar2(20), address varchar2(50)); Create table Orderdata( orderID char(5) constraint oid_uniq primary key, orderdate date, shipdate date, ItemId char(5) references Item.ItemId, No_of_items number(4), Unitcost number(7,2), Order_total number(7,2), custID char(5) references customer.custID); Insert Into Item values(‘A123’,’Pencil’,2.5); Insert Into Item values(‘B123’,’Pen’,15); Insert Into...
Java Programing Code only Ragged Array Assignment Outcome: Student will demonstrate the ability to create and use a 2D array Student will demonstrate the ability to create and use a jagged array Student will demonstrate the ability to design a menu system Student will demonstrate the ability to think Program Specifications: Write a program that does the following: Uses a menu system Creates an array with less than 25 rows and greater than 5 rows and an unknown number of...
HELP DATABASE QU
Question 1: Think About the relational database table data as given below, write the following queries in Oracle SQL. Company (Cid, Cname, City, Budget, Branch) Department (Deptno, Dname, Building, Cname) Employee (Ename, Deptno, Street, City, Phone, Salary) Works (Ename, Deptno, Hire_date) Location (Cname, Location ) 1. Write Query to Create the Company table, suggest appropriate data type of each attribute, consider that there should be a name for each company. 2. Find employee name/names who live in...
Consider the following two tables: Table – EmployeeInformations Table – EmployeeSalary EmpId Name ManagerId DateOfJoining 121 Ali 321 01/31/2014 321 Raed 986 01/30/2015 421 Khaled 876 27/11/2016 EmpId Project Salary 121 P1 8000 321 P2 1000 421 P1 12000 Write a SQL query to find the names of all employees having salary greater than or equal to 5000 and less than or equal 10000? Write a SQL query to find all employees from the " EmployeeInformations " table, sorted by the...