In PL SQL, Create a trigger on employees that will not allow employees to update salary for Accountants. Executes the trigger body before the triggering DML event on a table. As result of your trigger the following message should be displayed “ You are not allowed to update accountants salary” Hint: Use when clause
Q: Assume that you have these 5 tables.. Answer this question by using those tables. Please. Create in…
A: Step 1   Assume the following tables: Student (studid, email, name) Club (clubid, telephone,…
Q: Create a Procedure in PL/SQL takes employee_id, rate_salary, rate_commission. This function will…
A: Find the required procedure in PL/SQL given as below :
Q: Use CASE statement in PL SQL block, where take a character as input from the user and print…
A:
Q: Assignment : PL/SQL Practice Note: PL/SQL can be executed in SQL*Plus or SQL Developer or…
A: Hey there, I am writing the required solution based on the above given question. Please do find the…
Q: In SQL, which command is used to SELECT only one copy of each set of duplicable rows
A: In SQL command which is used to SELECT only one copy of each set of duplicable rows are:-
Q: Q3. Write a PL/SQL procedure to change the name of the project to “AL Dahariyah Projects” where…
A: PL/SQL procedure A stored procedure is a set of PL/SQL statements code that is written once and…
Q: Using the university schema, write an SQL query to find the number of students in each section. The…
A: SQL Query: SELECT s.course_id, s.sec_id, s.year, s.semester, count(id) AS numFROM takes t, section…
Q: Write a PL/SQL block to read and display the job_id and number of employees per job_id. Accept input…
A: DECLARE CURSOR employees_cur IS SELECT employee_id, first_name,…
Q: in sql In a sequence, the CURRVAL must be used at least once in order to get the NEXTVAL Select…
A: In order to get the NEXTVAL, the sequence should be considered with the CURRVAL which acts as base…
Q: QL Help I need to create a PL/SQL trigger called aprove_rental that will prevent an INSERT if a…
A: Code create table client (client_num char(4), client_lname varchar2(15) not null, client_fname…
Q: Write a PL/SQL block to accept a date from the user and print the day and the date as shown below.…
A: Solution:Given data,The PL/SQL code read the user input of date and display the day and the date in…
Q: What is the purpose of the WHERE clause in SQL? Which comparison operators can you use in a WHERE…
A: In SQL, WHERE clause is used to extract only particular field or row that satisfies a criteria from…
Q: Create a PL/SQL query to display the invoice number, coin name, coin price and delivery notes. In…
A: create the table Bill which contains the following fields, Bill number product price delivery note…
Q: Use %ROWTYPE for your cursor. You will use 3 tables in this activity – departments, locations, and…
A: It is defined as a combination of SQL along with the procedural features of programming languages.…
Q: The command cannot be used in PL/SQL triggers. O A. ALTER O B. UPDATE OC. DELETE D. INSERT
A: ALTER command cannot be used in trigger because it is DDL command
Q: In SQL what is the purpose of the SELECT statement? Give an example.
A: The SELECT statement is used to select data from a database. Syntax of SELECT statement SELECT…
Q: The following SQL clause(s) are not permitted to be used in a subquery in the WHERE or HAVING…
A: Multicolumn subqueries cannot use the <, >, <=, >= comparison operators.
Q: SQL Please see the attached image.
A: SQL query that will display all the records from the products table in reverse alphabetical order…
Q: Complete PL/SQL function below, which will return last name of employee whose id is equals to 2…
A: The above question is solved in step 2:-
Q: Use SQL Developer or Oracle Live SQL to write the appropriate SQL commands as follows: a) Group all…
A: Process To display the all the data we use select * from tablename and condition what we want to get…
Q: Explain the purpose of the CHECK clause within a CREATE TABLE SQL command. Explain the purpose of…
A: Given: Explain the purpose of the CHECK clause within a CREATE TABLE SQL command. Explain the…
Q: Create a procedure in PL/SQL takes Department Id and return record data type has maximum salary,…
A: Find the required procedure in PL/SQL given as below :
Q: The only required sections of a PL/SQL block are DECLARE and END. Answers: Yes No
A: Given:
Q: Write SQL Command to display all employees details whose job id is either AD_VP or PU_MAN. Order the…
A: We are given Employess table which contain all the attributes asked in query, so we will use…
Q: Write a PL/SQL Triger that prevents any one to take more than 5,000 JD
A: Given: Write a PL/SQL Triger that prevents any one to take more than 5,000 JD
Q: Write a PL/SQL procedure to change the name of the project to “AL Dahariyah Projects” where place…
A: GIVEN: Write a PL/SQL procedure to change the name of the project to “AL Dahariyah Projects”where…
Q: a. Find all movies with a cost less than or equal to the average moVies cost b. Write a query to…
A: Select Query: It will retrieve data from the table. select * from table name;…
Q: Use SQL Developer or Oracle Live SQL to write the appropriate SQL commands as follows: )…
A: Below is the required procedure:
Q: Create a PL/SQL a cursor program that will increase the employee salary to 25% who are having the…
A: SQL stands for Structured Query Language. It is used for storing and managing data in relational…
Q: In the SQL Oracle Application, Within the Employees table, each manager_id is the manager of one or…
A: Answer: SELECT manager_id, job_id, SUM(salary) "total salary", GROUPING(manager_id),…
Q: Write the SQL code to validate the ASSIGN_CHARGE values in the ASSIGNMENT table. Your query should…
A: ORDER BY Clause: SQL contains “ORDER BY” clause in order to sort rows. The values get sorted in…
Q: The given SQL creates a Movie table and inserts some movies. The SELECT statement selects all…
A: Answer
Q: 6. Write the SQL code to validate the ASSIGN_CHARGE values in the ASSIGNMENT table. Your query…
A: Hey, since multiple questions posted, we will answer first question according to our policy. If you…
Q: How would I create a Update statement in SQL Lite for the following question: Update the…
A: UPDATE TableName SET column1= value,..... WHERE condition;
Q: Write the SQL code to validate the ASSIGN_CHARGE values in the ASSIGNMENT table. Your query should…
A: UPDATE ASSIGNMENT SET CALC_ASSIGN_CHARGE = ASSIGN_CHG_HR* ASSIGN_HOURS;
Q: sid sname address age occupation salary Pavment mode gender 123 şam yacoas 31 manager 60000 cash m…
A: I have given an answer in step 2.
Q: 1.Write SQL Command to, display employee id and ob id who gets salary within the range of 4000 and…
A: SELECT keyword is used to display particular columns BETWEEN is the keyword used to specify the…
Q: Write an SQL query using the NOT operator that will show all employeeinformation from the Employee…
A: SQL query: SELECT * FROM Employee WHERE NOT Employee_Number = 7344;
Q: Create a PL/SQL query to display the combined customer name, coin purchased, coin price and the…
A: given Data is
Q: Create a PL/SQL query to display the customer name, employee name and the coin product returned. In…
A: SELECTconcat(left(CUSTOMER_TABLE.FIRST_NAME,1),'.',CUSTOMER_TABLE.SURNAME) AS…
Q: From Oracle SQL Need Code Task 4: In the NONCAT table, increase the price of each item in category…
A: Please upvote me. I am providing you the correct answer below. I am taking certain assumptions…
Q: Use PL/SQL in oracle sql developer Feature :Given a start and end date, print out name, phone…
A: The database is created with event table event eventID name ph_no ev_date status 1001 Abi…
Q: Write two SQL Queries that will show the ORDER# from both the Orderand OrderItems table using the…
A: In SQL the UNION clause combines the results of two SQL queries into a single table of all matching…
In PL SQL, Create a trigger on employees that will not allow employees to update salary for Accountants.
Executes the trigger body before the triggering DML event on a table.
As result of your trigger the following message should be displayed “ You are not allowed to update accountants salary”
Hint: Use when clause
Step by step
Solved in 4 steps with 2 images
- (https://dev.mysql.com/doc/refman/8.0/en/functions.html). Choose 1 string function and 1 numeric function and write a query that uses the two functions you chose in the same query. Create 3 separate queries.My resualt has error? SELECT last_name,customer_number2 from CUSTOMERS WHERE REFERRED is not null;SELECT last_name,customer_number*ERROR at line 1:ORA-00904: "CUSTOMER_NUMBER": invalid identifier List all customers who were referred to the bookstore by another customer. List eachcustomer’s last name and the number of the customer who made the referral.The following table shows a list of pets and their owners that is used by a veterinarian service. P_Name Type Breed DOB Owner O_Phone O_E-mail Kino Dog Std. Poodle 3/27/97 M. Downs 5551236 md@abc.com Teddy Cat Chartraux 4/2/98 M. Downs 1232343 md@abc.com Filo Dog Std. Poodle 2/24/02 R. James 2343454 rj@abc.com AJ Dog Collie Mix 11/12/95 Liz Frier 3456567 liz@abc.com Cedro Cat Unknown 12/10/96 R.James 7865432 rj@abc.com Woolley Cat Unknown 10/2/00 M. Trent 9870678 mt@abc.com Buster Dog Collie 4/4/01 Ronny 4565433 ron@abc.com a. Describe 4 problems that are likely to occur when using this table. b. Break the table into two tables in a way that fixes the four problems.
- The PatientDim table contains columns. PatientEpicId and name. Use the following query to answer the questions below it: SELECT PatientEpicID Name FROM PatientDim What does this query return? select one of the following: A. Nothing because the query won't run.B. The column PatientEpicId and name from the table PatientDimC. The PatientEpicID column from the table PatientDim, with an alias of name.D. The name column from the table PatientDim, with an alias of PatientEpicIdCREATE DATABASE COUNTRIES; USE COUNTRIES; DROP TABLE IF EXISTS `City`; CREATE TABLE `City` ( `ID` int(11) NOT NULL AUTO_INCREMENT, `Name` char(35) NOT NULL DEFAULT '', `CountryCode` char(3) NOT NULL DEFAULT '', `District` char(20) NOT NULL DEFAULT '', `Population` int(11) NOT NULL DEFAULT '0', PRIMARY KEY (`ID`) ) ENGINE=MyISAM AUTO_INCREMENT=4080 DEFAULT CHARSET=latin1; -- -- Dumping data for table `City` -- -- ORDER BY: `ID` INSERT INTO `City` VALUES (1,'Kabul','AFG','Kabol',1780000); INSERT INTO `City` VALUES (2,'Qandahar','AFG','Qandahar',237500); INSERT INTO `City` VALUES (3,'Herat','AFG','Herat',186800); INSERT INTO `City` VALUES (4,'Mazar-e-Sharif','AFG','Balkh',127800); INSERT INTO `City` VALUES (5,'Amsterdam','NLD','Noord-Holland',731200); INSERT INTO `City` VALUES (6,'Rotterdam','NLD','Zuid-Holland',593321); INSERT INTO `City` VALUES (7,'Haag','NLD','Zuid-Holland',440900); INSERT INTO `City` VALUES (3068,'Berlin','DEU','Berliini',3386667); INSERT INTO `City` VALUES…Course: Database *(SQL)* Please excute the given SQL script (https://drive.google.com/file/d/1zxe_aOhERjVCL54_zbgSLkFTRHYQhOPW/view?usp=sharing) for accessing the data. The data is described in the following relation schemas: Airport (airportID, name, city) Passenger (ticketNo, name, nationality, flightNo, seatNo)FK: flightNo references Flight (flightNo)FK: seatNo references Seat (seatNo) Flight (flightNo, flightCompany, departAirport, arrivalAirport)FK: departAirport references Airport (airportID)FK: arrivalAirport references Airport (airportID) Seat (seatNo, flightNo, class)FK: flightNo references Flight (flightNo) #Construct the SQL statements based on following transactions: Transaction SQL Statement Retrieve the flight number, departure and arrival airports of all British Airways. Retrieve the name of every passenger together with their flight number and the associated company. Retrieve all flights departed from all airports in London. Retrieve the ticket numbers…
- Course: Database *(SQL)* Please excute the given SQL script (https://drive.google.com/file/d/1zxe_aOhERjVCL54_zbgSLkFTRHYQhOPW/view?usp=sharing) for accessing the data. The data is described in the following relation schemas: Airport (airportID, name, city) Passenger (ticketNo, name, nationality, flightNo, seatNo)FK: flightNo references Flight (flightNo)FK: seatNo references Seat (seatNo) Flight (flightNo, flightCompany, departAirport, arrivalAirport)FK: departAirport references Airport (airportID)FK: arrivalAirport references Airport (airportID) Seat (seatNo, flightNo, class)FK: flightNo references Flight (flightNo) #Construct the SQL statements based on following transactions:1. Retrieve all rows in Airport table for all the airports in London city.2. Retrieve all British and German passengers.3. Retrieve all names of all the passengers.4. Retrieve the flight number, departure and arrival airports of all British Airways.5. Retrieve the name of every passenger together with their…Course: Database *(SQL)* Please excute the given SQL script (https://drive.google.com/file/d/1zxe_aOhERjVCL54_zbgSLkFTRHYQhOPW/view?usp=sharing) for accessing the data. The data is described in the following relation schemas: Airport (airportID, name, city) Passenger (ticketNo, name, nationality, flightNo, seatNo)FK: flightNo references Flight (flightNo)FK: seatNo references Seat (seatNo) Flight (flightNo, flightCompany, departAirport, arrivalAirport)FK: departAirport references Airport (airportID)FK: arrivalAirport references Airport (airportID) Seat (seatNo, flightNo, class)FK: flightNo references Flight (flightNo) #Construct the SQL statements based on following transactions: Transaction SQL Statement Retrieve all rows in Airport table for all the airports in London city. Retrieve all British and German passengers. Retrieve all names of all the passengers. Retrieve the flight number, departure and arrival airports of all British Airways. Retrieve the name of…Course: Database *(SQL)* Please excute the given SQL script (https://drive.google.com/file/d/1zxe_aOhERjVCL54_zbgSLkFTRHYQhOPW/view?usp=sharing) for accessing the data. The data is described in the following relation schemas: Airport (airportID, name, city) Passenger (ticketNo, name, nationality, flightNo, seatNo)FK: flightNo references Flight (flightNo)FK: seatNo references Seat (seatNo) Flight (flightNo, flightCompany, departAirport, arrivalAirport)FK: departAirport references Airport (airportID)FK: arrivalAirport references Airport (airportID) Seat (seatNo, flightNo, class)FK: flightNo references Flight (flightNo) #Construct the SQL statements based on following transactions: please if you could give all the sql statements needed i will appreciate that, and i promise to put thump up Transaction SQL Statement Retrieve all rows in Airport table for all the airports in London city. Retrieve all British and German passengers. Retrieve all names of all the passengers.…
- CUSTOMERColumns = 7, Rows = 10 CustomerID LastName FirstName Address ZIP Phone Email 1 Shire Robert 6225 Evanston Ave N 98103 206-524-2433 Robert.Shire@somewhere.com 2 Goodyear Katherine 7335 11th Ave NE 98105 206-524-3544 Katherine.Goodyear@somewhere.com 3 Bancroft Chris 12605 NE 6th Street 98005 425-635-9788 Chris.Bancroft@somewhere.com 4 Griffith John 335 Aloha Street 98109 206-524-4655 John.Griffith@somewhere.com 5 Tierney Doris 14510 NE 4th Street 98005 425-635-8677 Doris.Tierney@somewhere.com 6 Anderson Donna 1410 Hillcrest Parkway 98273 360-538-7566 Donna.Anderson@elsewhere.com 7 Svane Jack 3211 42nd Street 98115 206-524-5766 Jack.Svane@somewhere.com 8 Walsh Denesha 6712 24th Avenue NE 98053 425-635-7566 Denesha.Walsh@somewhere.com 9 Enquist Craig 534 15th Street 98225 360-538-6455 Craig.Enquist@elsewhere.com 10 Anderson Rose 6823 17th Ave NE 98105 206-524-6877 Rose.Anderson@elsewhere.com EMPLOYEEColumns = 5, Rows = 5 EmployeeID LastName FirstName…CUSTOMERColumns = 7, Rows = 10 CustomerID LastName FirstName Address ZIP Phone Email 1 Shire Robert 6225 Evanston Ave N 98103 206-524-2433 Robert.Shire@somewhere.com 2 Goodyear Katherine 7335 11th Ave NE 98105 206-524-3544 Katherine.Goodyear@somewhere.com 3 Bancroft Chris 12605 NE 6th Street 98005 425-635-9788 Chris.Bancroft@somewhere.com 4 Griffith John 335 Aloha Street 98109 206-524-4655 John.Griffith@somewhere.com 5 Tierney Doris 14510 NE 4th Street 98005 425-635-8677 Doris.Tierney@somewhere.com 6 Anderson Donna 1410 Hillcrest Parkway 98273 360-538-7566 Donna.Anderson@elsewhere.com 7 Svane Jack 3211 42nd Street 98115 206-524-5766 Jack.Svane@somewhere.com 8 Walsh Denesha 6712 24th Avenue NE 98053 425-635-7566 Denesha.Walsh@somewhere.com 9 Enquist Craig 534 15th Street 98225 360-538-6455 Craig.Enquist@elsewhere.com 10 Anderson Rose 6823 17th Ave NE 98105 206-524-6877 Rose.Anderson@elsewhere.com EMPLOYEEColumns = 5, Rows = 5 EmployeeID LastName FirstName…Hello can you help me to connect my registration PHP which I don't know how to insert those registration data on my database and table which is the admin table and the regular table. Can you help me for the right code for the table admin and regular to connect to my database I would appreciate if you would put the right code and SQL query for the connection. Here is my PHP code <?php session_start(); include 'database_connection.php'; if($_POST['uname'] && $_POST['password']) { $name=$_POST['name']; $lname = $_POST['lname']; $fname = $_POST['fname']; $mname = $_POST['mname']; $gen = $_POST['gender']; $birth = $_POST['birth']; $type = $_POST['utype']; $email = $_POST['email']; $pass=$_POST['password']; if($type=='Admin') admin($name,$lname,$fname,$mname,$gen,$birth,$email,$pass,$con); else regular($name,$lname,$fname,$mname,$gen,$birth,$email,$pass,$con); }…