Which of the following statements can be used to display data using the view called "VIEW_PAYE_Kenya"? a.SELECT * FROM VIEW_PAYE_Kenya; b.CALL VIEW_PAYE_Kenya();
Q: Database course: Which of the following queries is used to list a unique value for V_CODE, where…
A: District keyword is used to fetch distinct records.
Q: Ch2 Question 3: While you can insert new rows and columns, you cannot insert single cells.…
A: Question 3: While you can insert new rows and columns, you cannot insert single cells. ANS: -…
Q: Which statement is true regarding external tables? a. The default REJECT LIMIT for external tables…
A: Explanation:- true stаtement regаrding externаl tаbles is: The СREАTE TАBLE АS SELEСT…
Q: 2a. Create a view "View_Dept6090" which will display columns EmpNo, EName and Salary, by selecting…
A: Creating view Here the view displays EmpNo, EName and Salary by selecting the employee_id,…
Q: First create a Query "YourFirstName Customers without contact information" displaying Company Names…
A: Find the required query given as below :
Q: CREATE TABLESPACE user_tbspace DATAFILE 'user.dbf' SIZE 2m; create user mary identified by mary;…
A: Given that, CREATE TABLESPACE user_tbspace DATAFILE 'user.dbf' SIZE 2m; create user mary identified…
Q: QUESTION 7 A SELECT clause permits O All of these O Calculated fields O None of these O Formatted…
A: Introduction :We have given a MCQ and Asked about the SELECT clause in SQL
Q: Which attribute pair in a form allows data to be uploaded? o value="file" o type="file" o…
A: A form attributes allows data to be uploaded through attributes pair.
Q: Please select random names for database and tables. Also for the database connection. Write the…
A: Random names for database and tables. To select random records from table in mysql. and random…
Q: Which of the following Character Manipulation Function “Removes all specified characters from either…
A: We are going to learn which function in SQL removes all specified characters from either the…
Q: odify the ApplicationListing query to meet following requirements: The query should select all…
A: The given problem is to be solved in MS Acess where the query is already designed and named…
Q: Which of the following is true?a. All data in a table can be recovered if the table is dropped with…
A: ANS: - Option(B) is correct. All data in a table can be recovered from recycle bin if the table is…
Q: Write a CREATE VIEW statement that defines a view named InvoiceBasic that returns three columns:…
A: In the structured query language to form a query, there are three statements used which are select,…
Q: Create an anonymous block that returns the number of students in a section. Prompt for section id.…
A: As these are separate questions, as per Bartleby's rules, we are answering only the first one
Q: hoose 1 string function and 1 numeric function and write a query that uses the two functions you…
A: The given problem is related to MYSQL querie where the logical model of the tables is given and the…
Q: iv. SELECT * FROM OrderLine WHERE discount = 0.1; Create an index such that the execution of the…
A: iv. CREATE UNIQUE INDEX In1 ON OrderLine(OrderNum); Explanation: This query is used to create the…
Q: iv. SELECT * FROM OrderLine WHERE discount = 0.1; Create an index such that the execution of the…
A: iv. CREATE UNIQUE INDEX In1 ON OrderLine(OrderNum); Explanation: This query is used to create the…
Q: Which is NOT true of the view? Group of answer choices 1. Its main role is to display information to…
A: MVC is Model View Controller and it is an architectural pattern. It can divided application into…
Q: While using EnCase, you need to examine the raw data. Which view would you look at to view raw…
A: Encase is traditionally used in forensics to recover evidence from seized hard drives. Encase allows…
Q: columns in the Athletics table are named AthleteID, First_name, Last_name, DOB, SportsCode, and…
A: Here have to determine about sql query for create table using SQL.
Q: Which of the following is false about SQL? Select one: a. SQL can update records in a database b.…
A: SQL is short for Structured Query Language. It is used to create, manipulate and manage database. It…
Q: Create a view named MONTHLY_RENTS. It consists of three columns: the first is the number of…
A: View in sql : view is a virtual table based on the result-set of an SQL statement.
Q: Using data as shown above, you need to : 1)Calculate and fill the column using data validation.…
A: Give the data, Need to Calculate and fill the column using data validation.
Q: In this Assignment, you will build a supermarket product management app that persists da offline.…
A: It is defined as programs can be asked from control statements, array, string, oops etc. Java basic…
Q: "Adding rows to a table" Please follow the instruction and submit screen shuts to the Blackboard…
A: Find the required queries given as below :
Q: LOOKUP function can be set up to find either exact or approximate matches for a value that is being…
A: the answer is option a The VLOOKUP function can be set up to find either exact or approximate…
Q: 15. Which of the following column properties would be used to specify that cells in a column must…
A: Please find the answer to the above question below:
Q: Database for small Business Assignment Create a Database Restaurant. Create the following tables and…
A: The very first step is to create the Restaurant Database. It can be created using the query as…
Q: When should you use the %ROWTYPE attribute in creating a record variable? Answers: a. when using…
A: Required: when use %ROWTYPE
Q: EMPDET is an external table containing the columns EMPNO and ENAME. Which command would work in…
A: MPDET is an external table containing the columns EMPNO and ENAME. Which command would work in…
Q: Which of the following statements will display all Female student names. such that older students…
A: The correct SQL query will be chosen from the given question and explained with appropriate examples…
Q: SQL ANSWERED -- Create a view called EMP_VU based on the employee number, employee name, and…
A: VIEW In SQL a view is a virtual table based on the result set of an SQL statement. a view contains…
Q: We have to enter data to the employ class. • Add 3 TextView •Add 3 Edittext View to get input from…
A: Answer is given below .
Q: procedure that accepts a country_id as a parameter and displays the name of the country and its…
A: It is defined as a Structured Query Language which is a computer language for storing, manipulating…
Q: Book (BookID, Price, Year, Author, Subject) BorrowLog (BID, BookID, CustomerID, DateTime) Customer…
A: To Do: To write SQL Statements.
Q: For each of the following commands, how many rows are affected (updated, deleted, or inserted)? If…
A: It deletes 1 row from table employee where id is 3.
Q: You can use the DataGridView control to make several changes to the dataset, except for __.…
A: We can use the DataGridView control to make several changes to the dataset :- adding a new column…
Q: List all the views contained within the system catalog. Write the command to display only tables…
A: SELECT OBJECT_SCHEMA_NAME(vi.object_id) schema_name, vi.name FROM sys.views as vi;
Q: he screenshot of the query and the results below is from the question of each number, and saved with…
A: The given problem has list of tables and the requirement is to add the data in the tables: **As…
Q: A table can be visualized as a two-dimensional arrangement of data that consists of rows and…
A: SQL CREATE TABLE statement is used to create table in a database. Syntax: create table "tablename"…
Q: A table can be visualized as a two-dimensional arrangement of data that consists of rows and…
A: Example: Given that you have administrative authority, create a table named 'INVENTORY' with the…
Q: Create an ASP.net Web application and a Webform and to connect to a MS-SQLSERVER database JU_Emp…
A: Computer Science Create an ASP.net Web application and a Webform and to connect to a MS-SQLSERVER…
Q: Which of the following statements is correct about the MD5 value used with evidence file…
A: The correct answer for the above question is given in the below steps
Q: i, To increase allowances of the players by 3%. ii. Create a view to display all players from…
A: *Multiple Sub- parts* as per our company guidelines we are supposed to answer ️only first 3️⃣…
Q: rite a pseudo-code that override the onTouchEvent function in a View to perform rotation of the view…
A: Lets see the solution.
Q: A table can be visualized as a two-dimensional arrangement of data that consists of rows and…
A: Introduction: A table can be created by using the CREATE TABLE statement. The syntax to create a…
Q: Which of the following KEYWORDS are used to declare a variable as the same data type as a database…
A: %ROWCOUNT gives the number of rows altered by a insertion, deletion. %ROWTYPE used to provide a…
Q: C. Write the following queries to retrieve the information detailed below. Average number of…
A: As per the guidelines we have given answer for the first three subparts of your question. the…
Q: Create a trigger named trg_char_hours that automatically updates the AIRCRAFT table when a new…
A: TRIGGER: Following is the trigger definition which performs the above required task: CREATE OR…
SQL
SQL stands for Structured Query Language, is a form of communication that uses queries structured in a specific format to store, manage & retrieve data from a relational database.
Queries
A query is a type of computer programming language that is used to retrieve data from a database. Databases are useful in a variety of ways. They enable the retrieval of records or parts of records, as well as the performance of various calculations prior to displaying the results. A search query is one type of query that many people perform several times per day. A search query is executed every time you use a search engine to find something. When you press the Enter key, the keywords are sent to the search engine, where they are processed by an algorithm that retrieves related results from the search index. Your query's results are displayed on a search engine results page, or SER.
Step by step
Solved in 2 steps
- You have been instructed to add a new student information to the students table. Because the student is new, he has no marks before, you should not add an amount to the CGPA. The Students table contains these columns: Student_id NUMBER(10) Student_name VARCHAR2(30) Student phone NUMBER(10) CGPA NUMBER(2,2) Which INSERT statements will accomplish your objective? O a. INSERT INTO students VALUES (365, 'Khalil',99554721, 0 ) O b. INSERT INTO students VALUES (365, 'Khalil',99554721, 'NO CGPA' ) O c. INSERT INTO students VALUES (365, 'Khalil',99554721, NULL ) O d. INSERT INTO students VALUES (365, 'Khalil',99554721) Which line of code has an error? 1. CREATE TABLE FRUITS VEGETABLES 2. FRUIT TYPE VARCHAR2, 3. FRUIT NAME CHAR (20), 4. QUANTITY NUMBER (4)); O a. 1 O b. 2 O c. 3Database Q1: Which one of the following INSERT statements will successfully insert a single row? The following table has been created: CREATE TABLE student_table ( stud_id NUMBER (6), last_name VARCHAR2 (20), first_name VARCHAR2 (20), lunch_num NUMBER (4) ; a) INSERT VALUES INTO student_table (143354, ‘Roberts’, ‘Cameron’, 6543); b) INSERT INTO student_table COLMUNS (stud_id, last_name, lunch_num) VALUES (143352, ‘Roberts’, 5543, ‘Cameron’); c) INSERT TO student_table (stud_id, lunch_num, first_name, last_name) VALUES (143352, 6543, ‘Cameron’, ‘Roberts’); d) INSERT INTO student_table VALUES (143354, ‘Roberts’, ‘Cameron’, 6543); Q2: What does the following SQL statement display: SELECT EMP_ID, LAST_NAME, SALARY FROM EMPLOYEES WHERE SALARY > (SELECT MIN (E. SALARY) FROM EMPLOYEES E) ORDER BY SALARY DESC; a) Employees information who earn less money than the maximum salary b) Employees information who earn more money than the highest employee salary c) Employees information who earn…9. Write a SELECT statement that uses aggregate window functions to calculate the total due for all vendors and the total due for each vendor. Return 3 Columns: The vendor id from the Invoices table. The balance due (invoice_total-payment_total-credit_total) for each invoice in the invoices table with a balance greater than 0. The total balance due for all vendors in the Invoices table. Modify the column that contains the balance due for each vendor so it contains a cumulative total by balance due.
- Which of the following is true? (refer to the tables in the JustLee Books database)a. If you truncate a table, you can’t add new data to the table.b. If you change the default value of an existing column, all existing rows containing a NULL value in the same column are set to the new DEFAULT value.c. If you delete a column from a table, you can’t add a column to the table with the same name as the previously deleted column.d. If you add a column to an existing table, it’s always added as the last column of the table.Q1. Write a SELECT statement that returns these columns from the Invoices table: The invoice _total column A column that uses the ROUND function to return the invoice_total column with 1 decimal digit A column that uses the ROUND function to return the invoice_total column with no decimal digits Q1. Write a SELECT statement that returns these columns from the Invoices table: • The invoice_total column • A column that uses the ROUND function to return the invoice_total column with 1 decimal digit • A column that uses the ROUND function to return the invoice_total column with no decimal digits invoice_total one digit 3813.33 3813.3 zero_digits 3813Views: Create a view “customer_guangzhou”, it indicates the customers from the city “guangzhou”; Create a view “ordersum_goods”, it indicates the total quantity of the orders of each product (goods).
- Q11: After mapping the following ERD, choose the correct SQL statement that will insert a single row to the Vertebrates Table AID weight Vertebrates vertrebraLength Animal AName Disjoint ISA Invertebrates locations Eats amountPerDay type Food FID a. Insert into Vertebrates (VertebratesLength) values (1.5') b. Insert into Vertebrates (AID, AName, Weight) values (101', 'Salmon', '30') c. Insert into Vertebrates (AID, AName, Weight, VertebratesLength) values (101, 'Salmon', '30','1.5) d. Insert into Vertebrates (AID, Vertebrates Length) values (101', '1.5')Which of the following data dictionary objects should be used to view information about the constraints in a database? ( refer to the tables in the JustLee Books database). a. USER_TABLES b. USER_RULES c. USER_COLUMNS d. USER_CONSTRAINTS e. None of the above objects should be usedWhich of the following statements retrieves data from the Sales table and stores it in the CompanyDataSet? a. Me.CompanyDataSet.Fill(Me.Sales) b. Me.SalesBindingSource.Fill(Me.CompanyDataSet) c. Me.SalesBindingNavigator.Fill(Me.CompanyDataSet.Sales) d. Me.SalesTableAdapter.Fill(Me.CompanyDataSet.Sales)
- Q1. Write a SELECT statement that returns these columns from the Invoices table: ⚫ The invoice_total column • A column that uses the ROUND function to return the invoice_total column with 1 decimal digit • A column that uses the ROUND function to return the invoice_total column with no decimal digits invoice_total one_digit 3813.33 zero_digits 3813.3 3813with it, paste your code in a text file named Student.txt and save it in your task folder. Write the SQL code to create a table called Student. The table structure is summarised in the table below (Note that STU_NUM is the primary key): STU_NUM Attribute Name STU_SNAME STU_FNAME STU_INITIAL STU_STARTDATE COURSE_CODE PROJ_NUM STU STU_S STU_F STU_INITIAL NUM NAME NAME 01 02 Snow John E CHAR(6) After you have created the table in question 1, write the SQL code to enter the first two rows of the table as below: Stark Arya с VARCHAR(15) VARCHAR(15) CHAR(1) DATE CHAR(3) INT(2) Data Type STU_STARTDATE COURSE_ PROJ_ CODE NUM 05-Apr-14 12-Jul-17 201 305 6 11 Assuming all the data in the Student table has been entered as shown below, write the SQL code that will list all attributes for a COURSE_CODE of 305.7. Use the UNION operator to generate a result set consisting of three columns from the Products table: Discount status A calculated column that contains a value of DISCOUNTED or FULL PRICE Product_name The product_name column discount_percent The discount_percent column If the product has a discount_percent greater than 0, the Discount_status column should contain a value of DISCOUNTED. Otherwise, it should contain a value of FULL PRICE. Sort the final result set by product_name.