Which of the following does NOT belong to the SQL Number Functions?
Q: Which of the following keywords and relational operators is used by SQL when performing wildcard…
A: LIKE is the keyword and relational operator is used by SQL when performing wildcard matches Example:…
Q: Which SQL function below puts data into programmer-defined categories? NTILE() statements CASE ()…
A: - We need to select the SQL function which puts data into programmer defined categories. - The…
Q: Which of the following sql statements contains an error? I) Select * from employee; II) Select *…
A: The correct answer is...
Q: What is the evaluation order for the Boolean operators (AND, OR, NOT) in an SQL command?
A: What is the evaluation order for the Boolean operators (AND, OR, NOT) in an SQL command?
Q: Which statement should be used to stop a PL/SQL loop? EXIT WHEN GOTO…
A: The EXIT statement breaks out of a loop. The EXIT statement has two forms: the unconditional EXIT…
Q: Where is the final sql query(select...) that is asked? could you write it
A: HI THEREI AM ADDING SQL QUERY BELOWPLEASE GO THROUGH ITTHANK YOU
Q: Which SQL statement returns customers with creditlimit less than or equal to 2000 (Creditlimit is a…
A: We need to answer:
Q: Which of the following SQL statements determines how many total customers were referred by other…
A: The statement with COUNT (referred) function counts the rows of non null data that exist in the…
Q: in sql The PL/SQL block starts with the _____ section. Select one: a. DECLARE b. BEGIN c. IS d.…
A: The SQL block always start with the DECLARE section. All the remaining options are incorrect.
Q: Which of the following does NOT belong to the SQL Number Functions? a. MOD b. TRIM c. TRUNC d. ROUND
A: In SQL TRUNCATE() Number Function is Used Not TRUNC.
Q: Write all the sql code (including create, insert and select)
A: #use the below query to create users tablecreate table users(account int primary key,name…
Q: Which of the following does NOT belong to the SQL Date Functions? a. LAST_DAY O b. ADD_MONTHS O c.…
A: Date functions in SQL: The queries in SQL work fine as long as data contains only the date portion,…
Q: In SQL Server, specify the differences between the two character data types as follows: NVARCHAR…
A: Data formats: When building a table in the database, each column will have its own data type, and…
Q: Write the SQL code to add sample data (1 row for each table).
A: Insertion into table USERS:- INSERT INTO USERS(USER_ID, USER_NAME, USER_TYPE, USER-LIMIT) VALUES…
Q: in sql Every PL/SQL block must be given a name. Select one: a. False b. True
A: In PL/SQL program, code is written in blocks. Its not necessary that every PL/SQL block must be…
Q: Which clause of a SQL Select statement is required if we want to display aggregate data by category…
A: Answer: 5) GROUP BY
Q: Which of the following SQL statements displays a customer’s name in all uppercase characters? (refer…
A: Statement to display customer name in upper case characters The upper function is used to replace…
Q: What is the output from the following WHILE loop
A: SQL is a structured query language used to manipulate databases. It is used to request information…
Q: Which SQL statement will return the same results as the following SQL statement? SELECT * FROM…
A: Answer: Option 2,3, and 4 are having the where conditions will give the different results
Q: When is the next Friday? The next Friday is on the TWENTY-SIXTH of FEBRUARY 2021
A: Writing SQL query
Q: Which of the following keyword is used in PL/SQL to initialize variables? %ROWTYPE…
A: b) DEFAULT
Q: Write a function and a call program in PL/SQL to sum the even integers between 1 and any number that…
A: given to write pl/sqlprocedure function for sum of 1 to n even numbers: Below is the procedure of…
Q: Which of the following SQL SELECT options is used to organize the data being returned?" a.…
A: The select statement always returns a virtual table as a result. As a result, there's a possibility…
Q: Write an SQL query using the IN operator to show all customers residingin the following zip codes:…
A: As the database is not given we have assumed the database CUSTOMERS. SQL query to create table…
Q: Which of the following functions is used to calculate the total value stored in a specified column?…
A: Count - this function is used to get number of rows or records of a table. MIN - this function is…
Q: 6. Which one of the following is not an aggregate function in SQL? a. COUNT b. ORDER c. SUM d. MAX
A: 5. Given two tables X and Y, Which of the following relational algebra is false? a. X JOIN Y is not…
Q: Which three types of SQL commands can be classified?
A: Below is the complete Explanation to the given question. Below contains types of SQL Commands in…
Q: Which of the following does NOT belong to the SQL Date Functions? a. ADD_MONTHS b. LAST_DAY c.…
A: ADD_MONTHS () function returns date with a given number of months added (date plus integer months).…
Q: Write an SQL query to get 127.57 as output for the number 127.569. Use appropriate number function…
A: LOGIC:- The ROUND method in SQL will be used to round off a number to the nearest decimal place.
Q: Write the difference between the characters' two data types in SQL Server: VARCHAR NVARCHAR
A: Data types: While creating a table in the database, each and every column of the table will be…
Q: Which one of the following should be specified in the statement if an SQL SELECT statement contains…
A: Note: please only post 1 question in one post. we are not allowed to solve more than one question in…
Q: 2.Write a program in PL/SQL to input a number and calculate its Factorial.
A: CODE: DECLARE fact_no number :=1; num number := &1;BEGIN while num > 0 loop…
Q: Is this statement true of false? In SQL, the SELECT statement, the HAVING clause, and the WHERE…
A: Answer:- In SQL, the SELECT statement, the HAVING clause, and the WHERE clause all correspond to a…
Q: In SQL Server, describe the distinction between the two data types for the characters as follows:…
A: Introduction: When establishing a table, a SQL developer must decide what data will be stored in…
Q: calculate the overtime hours using if then and end if .
A: SQL> SQL> -- Calculating overtime hours with IF. SQL> set echo on SQL> DECLARE 2…
Q: 8. Which of the following SELECT statements displays a list of student names from the Students…
A: explanation: in the given option only statement B will include both 2020001 and 2020100
Q: Which SQL clause(s) can’t be used in a subquery in the WHERE or HAVINGclauses?
A: Clause that cannot be used in sub query in WHERE or HAVING clause The ORDER BY keyword sorts the…
Q: In what clause of a SELECT statement is an IN operator used? What follows the IN operator? What…
A: Structured Query Language (SQL) is used to access and manipulate databases. SQL commands cover a…
Q: PL/SQL or T-SQL procedures in SQL
A: T-SQL :- T-SQL is an abbreviation for Transact Structure Query Language. It is a product by…
Step by step
Solved in 2 steps
- Database Access Code Write the codethe best that you can to execute the following SQLstatement against a database. Your code should read thedata from the DB and print out all of the data. Thedatabase is an Access database, setup with an ODBCname of "AccountingDB'. Do the best you can, partialcredit will be given. Put your code in the main methodgiven below. [Hint: SQL will return all accounts from thedatabase.]SOL = "Select AcctNo, Owner, Balance fromAccounts"public static void main (String args[])Adjust the following information so that1) all users on the system are able to run the SQL Executable and 2) multiple users (such as a team of software engineers) have the power to modify the SQL Executable Introduce any new groups that are needed and assign them group IDs USERS SQL Manager UID: 3 GROUPS SQL Users GID: 5 FILESDatabase File Owner 3 Group NA owner: rw group: - world: - setUID: 0 setGID: 0 sticky: 0 SQL Executable Owner 3 Group 5 owner: rwx group: r-x world: - setUID: 1 setGID: 0 sticky: 0Instructor(Instructor_Id, Instructor_Name, specialization, Address,#Department_Id)Department(Department_Id, Department_Name)Course(Course_code, Course_Title,Credit_hours,Contact_hours,#Department_Id)Teaching(#Instructor_Id, #Course_code)a) Express in SQL the following queries:i. Change to 6 the number of contact hours of the course which has thecode “ITDR2104”.ii. Add a new column named instructorLoad of type Number(2) to thetable instructor.iii. List the details of all the courses having a code that starts with“ITDR”. The output should be sorted in descending order by credithours.iv. Find the number of courses taught by the instructor whose name is“Ahmed”.v. List the names of all departments along with the number of coursesoffered by each department.vi. Find the titles of courses, which are taught by the instructor who isnamed “Ahmed”.b) Create a view named instructor_of_DBCourse to contain the details(Instructor_Name, specialization, Address, Department_Id) ofinstructors who teach…
- This assignment is aimed at building an understanding of how to improve performance within databases by taking advantage the computers hardware by modifying MS SQL settings Prerequisites: Completion of Assignment 1B, reading of Module Readings and Slides. Run the following query to understand how much Memory is currently in use in the database: SELECT physical_memory_in_use_kb/1024 AS sql_physical_memory_in_use_MB, large_page_allocations_kb/1024 AS sql_large_page_allocations_MB, locked_page_allocations_kb/1024 AS sql_locked_page_allocations_MB, virtual_address_space_reserved_kb/1024 AS sql_VAS_reserved_MB, virtual_address_space_committed_kb/1024 AS sql_VAS_committed_MB, virtual_address_space_available_kb/1024 AS sql_VAS_available_MB, page_fault_count AS sql_page_fault_count, memory_utilization_percentage AS sql_memory_utilization_percentage, process_physical_memory_low AS sql_process_physical_memory_low, process_virtual_memory_low AS…SQL QUERIES Employees(EMPLOYEE_ID, FIRST_NAME, LAST_NAME, EMAIL, PHONE_NUMBER, HIRE_DATE,JOB_ID, SALARY, COMMISSION_PCT, MANAGER_ID, DEPARTMENT_ID,DEPARTMENT_NAME)Department(DEPARTMENT_ID, DEPARTMENT_NAME, MANAGER_ID, LOCATION_ID)Location(LOCATION_ID,STREET_ADDRESS,POSTAL_CODE,CITY,STATE_PROVINCE,COUNTRY_ID) Write a Query in SQL to delete the record of all those cities where city name ends with b fromlocations table.Please written by computer source 1. For this project, you need to create the company database and populate it with the data given in the Oracle SQL PLUS environment (if you have not done so) 2. Your SQL commands should be placed in file(s) and run from the file(s). 3. Implement Triggers on all the tables to change character data to uppercase in the character data type columns. 4. Implement a Function that returns Dname from Department for any give employee. The parameter to the function would be the SSN. 5. Implement a Function that returns manager’s full name for any given department. The parameter to the function would be the department name. 6. Implement another Function that returns manager’s full name for any given department. The parameter to the function would be the department number. 7. Implement a Procedure that increases an employee salary by x%. Employee is identified by SSN and the percentage of increase is given as an input. 8. Implement a Package that contains the…
- SQL QUERIES Employees(EMPLOYEE_ID, FIRST_NAME, LAST_NAME, EMAIL, PHONE_NUMBER, HIRE_DATE,JOB_ID, SALARY, COMMISSION_PCT, MANAGER_ID, DEPARTMENT_ID,DEPARTMENT_NAME)Department(DEPARTMENT_ID, DEPARTMENT_NAME, MANAGER_ID, LOCATION_ID)Location(LOCATION_ID,STREET_ADDRESS,POSTAL_CODE,CITY,STATE_PROVINCE,COUNTRY_ID) Write a query in SQL to display the DEPARTMENT_NAME of all those Departments whoseDEPARTMENT_ID is greater than the DEPARTMENT_ID of Physics department. Write a Query in SQL to show the FIRST_NAME of all those employees whose salary is lessthan the salary of all those employees whose MANAGER_ID is 101 or 102.Question 13 Given the following relation: Movie (MovielID, Title, Genre, Year) Write a PL'SQL block of code that performs the following tasks: i. Read a movie id provided by user at run time and store it in a variable. i. Fetch the Genre and title of the movie having the entered id and store them inside two variables i. Display the fetched movie Genre and title. T T T T Paragraph v 3 (12pt) Arial T T O f. O Mashups HTHL CSSsql queries Employees(EMPLOYEE_ID, FIRST_NAME, LAST_NAME, EMAIL, PHONE_NUMBER, HIRE_DATE,JOB_ID, SALARY, COMMISSION_PCT, MANAGER_ID, DEPARTMENT_ID,DEPARTMENT_NAME)Department(DEPARTMENT_ID, DEPARTMENT_NAME, MANAGER_ID, LOCATION_ID)Location(LOCATION_ID,STREET_ADDRESS,POSTAL_CODE,CITY,STATE_PROVINCE,COUNTRY_ID) Write a query in SQL to display the Entire data of All those employees whoseDEPARTMENT_ID is greater than the DEPARTMENT_ID of all those employees who earn morethan 50,000 per month Write a query in SQL to display the minimum, maximum salary and DEPARTMENT_NAMEof all those departments whose minimum salary is greater than 4000 in ascending order.
- Below is part of a Student database. The primary keys are highlighted in bold. Student (studNo, studName, address, mobileNo) Registration (studNo, courseNo, regDate, semester, session) Course (courseNo, courseName, creditHour, level) Project (projNo, projName, courseNo) Assignment (projectNo, studNo, startDate, dueDate, hoursSpent) QUESTION 1. Write a PL/SQL FUNCTION that calculates the cost each student has to pay for all courses taken. In the photo is example the cost detail for each course. 2. Write a PL/SQL Procedure to call the function you created in question 1 . Allow the user to enter the student ID (studno). SECOND PHOTO IS THE EXAMPLE OF EXPECTED OUTPUTExercise 3: Procedural SQLWrite the following PSM functions or proceduresa) Take a price as argument and return the model number of the PC whose price isclosest.b) Take a maker and model as arguments, and return the price of whatever type ofproduct that model is.: Write SQL queries DDL Queries to implement the following Relational Model i.e. create the Nurse and Care_Center relations (including primary key and foreign key). Intelligently write data types. Show Output.