Database System Concepts
7th Edition
ISBN: 9780078022159
Author: Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher: McGraw-Hill Education
expand_more
expand_more
format_list_bulleted
Concept explainers
Question
7. Determine the length of data stored in the ISBN field of the BOOKS table. Make sure each
different length value is displayed only once (not once for each book).
SQL commands
Expert Solution
This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
This is a popular solution
Trending nowThis is a popular solution!
Step by stepSolved in 2 steps with 1 images
Knowledge Booster
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.Similar questions
- MICROSOFT SQL SERVER ONLY CURSOR T-SQL Obtain the name and credit limit of the customer whose number currently is stored in I_CUSTOMER_NUM. Place these values in the variables I_CUSTOMER_NAME and I_CREDIT_LIMIT, respectively. Output the content of I_CUSTOMER_NAME and I_CREDIT_LIMIT.arrow_forwardWrite a ASQ statement to return to see all of the first names in the People table. SELECT first name FROM people; WHERE FROM People first name; FROM People SELECT first_name; First name WHERE FROM People;arrow_forwardThe given SQL creates a Movie table and inserts some movies. The SELECT statement selects all movies. Press the Run button to produce a result table. Verify the result table displays five movies. Modify the SELECT statement to only select movies released after October 31, 2015: SELECT*FROM Movie WHERE ReleaseDate >'2015-10-31'; Then run the SQL again and verify the new query returns only three movies, all with release dates after October 31, 2015. CREATE TABLE Movie ( ID INT, Title VARCHAR(100), Rating VARCHAR(5), ReleaseDate DATE); INSERT INTO Movie VALUES (1, 'Rogue One: A Star Wars Story', 'PG-13', '2016-12-10'), (2, 'Hidden Figures', 'PG', '2017-01-06'), (3, 'Toy Story', 'G', '1995-11-22'), (4, 'Avengers: Endgame', 'PG-13', '2019-04-26'), (5, 'The Godfather', 'R', '1972-03-14'); -- Modify the SELECT statement:SELECT *FROM Movie;Where ReleaseDate > '2015-10-31';arrow_forward
- 4. Display a list of all book titles and the percentage of markup for each book. The percentageof markup should be displayed as a whole number (that is, multiplied by 100) with nodecimal position, followed by a percent sign (for example, .2793 = 28%). (The percentageof markup should reflect the difference between the retail and cost amounts as a percent ofthe cost.) SQL commandsarrow_forward2. Write a SQL statement to insert a new user with userId ‘XXXXX’ into the users table and populate at least 5 other columns including column userName. Note: userName column is varchar(20) and its value must be unique in the table users. DO NOT insert into the “created” column but pay attention to it’s value after the insert Paste the SQL below.arrow_forwardDatabase Q1: Select the correct SQL statement to provide the user Samer with read only permission on Employees table a) Grant read on Employee where username = Samer; b) Grant read only on Employee to Samer; c) Grant select to Samer on Employee; d) Grant select on Employee to Samer; Q2: Based on the TWO schema structures below, which SQL statement will create a view to show department names where each department has at least 5 employees? Employee (E_ID, E_Name, D_ID, E_Salary) Department (D_ID, D_Name, D_Address) (Select one) a) Create View Dept_Emp as select D_Name, count(E_ID) from Employee, Department where Employee D_ID = Department D_ID Group by D_Name Where count (E_ID) >= 5; b) Create View Dept_Emp as select D_Name, count(E_ID) from Employee D_ID = Department D_ID Group by D_Name Having count (E_ID) >= 5; c) Create View Dept_Emp as select D_Name, count(D_ID) from Employee, Department where Employee D_ID = Department D_ID Group by D_Name Having count (E_ID) >= 5; d)…arrow_forward
- CREATE TABLE Employee( firstName char(30) , lastName char(30) , hireDate date ,empNo int , empInitial char(30) , years int ); Write the SQL syntax to create an insert statement for the employee table you created above.arrow_forwardCreate a function to insert a new product into an existing order, include the product id, unit price, quantity. The output of the function is the message to notify the calling program whether the update succeeded or not. note : Note: Sql code need not java don't waste my time by giving java codearrow_forwardIN SQL If you omitted the WHERE clause of SELECT statement, the query returns an error because the where clause is required. Select one: True Falsearrow_forward
- Please help with pl/sql block!arrow_forwardDo fast please.arrow_forwardPlease help: Using the following sql file, how would you find List all the rows in which the prescription dates occur on or after November 14. How many doctors provide prescriptions with 30 tablets in total? List doctor’s details where speciality is either Dermatology or Neurology. (Use INoperator). List the results by the first name in ascending order and the last name indescending order Find all patients rows whose first names include ‘George’ (Assume case sensitivity). List number of patients that do not have a phone number. Beginfor c in (select table_name from user_tables) loopexecute immediate ('drop table '||c.table_name||' cascade constraints');end loop;End; //* Assignment_1 */ ALTER SESSION SET NLS_DATE_FORMAT = 'MM/DD/YYYY';CREATE TABLE DOCTOR (DOC_ID varchar2(5) PRIMARY KEY,DOC_LNAME varchar2(15),DOC_FNAME varchar2(15),DOC_INITIAL varchar2(1),DOC_SPECIALTY varchar2(15));INSERT INTO DOCTOR…arrow_forward
arrow_back_ios
SEE MORE QUESTIONS
arrow_forward_ios
Recommended textbooks for you
- Database System ConceptsComputer ScienceISBN:9780078022159Author:Abraham Silberschatz Professor, Henry F. Korth, S. SudarshanPublisher:McGraw-Hill EducationStarting Out with Python (4th Edition)Computer ScienceISBN:9780134444321Author:Tony GaddisPublisher:PEARSONDigital Fundamentals (11th Edition)Computer ScienceISBN:9780132737968Author:Thomas L. FloydPublisher:PEARSON
- C How to Program (8th Edition)Computer ScienceISBN:9780133976892Author:Paul J. Deitel, Harvey DeitelPublisher:PEARSONDatabase Systems: Design, Implementation, & Manag...Computer ScienceISBN:9781337627900Author:Carlos Coronel, Steven MorrisPublisher:Cengage LearningProgrammable Logic ControllersComputer ScienceISBN:9780073373843Author:Frank D. PetruzellaPublisher:McGraw-Hill Education
Database System Concepts
Computer Science
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:McGraw-Hill Education
Starting Out with Python (4th Edition)
Computer Science
ISBN:9780134444321
Author:Tony Gaddis
Publisher:PEARSON
Digital Fundamentals (11th Edition)
Computer Science
ISBN:9780132737968
Author:Thomas L. Floyd
Publisher:PEARSON
C How to Program (8th Edition)
Computer Science
ISBN:9780133976892
Author:Paul J. Deitel, Harvey Deitel
Publisher:PEARSON
Database Systems: Design, Implementation, & Manag...
Computer Science
ISBN:9781337627900
Author:Carlos Coronel, Steven Morris
Publisher:Cengage Learning
Programmable Logic Controllers
Computer Science
ISBN:9780073373843
Author:Frank D. Petruzella
Publisher:McGraw-Hill Education