Oracle 12c: SQL
3rd Edition
ISBN: 9781305251038
Author: Joan Casteel
Publisher: Cengage Learning
expand_more
expand_more
format_list_bulleted
Concept explainers
Expert Solution & Answer
Want to see the full answer?
Check out a sample textbook solutionStudents have asked these similar questions
Which of the following is a correct statement?a. A commit is issued implicitly when a user exits SQL Developer or SQL*Plus.b. A commit is issued implicitly when a DDL command is executed.c. A commit is issued automatically when a DML command is executed.d. All of the above are correct.e. Both a and b are correct.f. Both a and c are correct
A. If you are at the SQL prompt, use !filename to open a file called filename and execute the commands inside the file. TRUE OR FALSE
B. If you use an ORDER BY clause, it must always be the last clause in the SQL Query statement. TRUE OR FALSE
C. If you want to create a Cartesian product, simply do not join the tables in an SQL query statement. TRUE OR FALSE
Which of the following SQL statements produces “Hello World” as the output? (refer to the tables in the JustLee Books database.)a. SELECT "Hello World" FROM dual;b. SELECT INITCAP('HELLO WORLD') FROM dual;c. SELECT LOWER('HELLO WORLD') FROM dual;d. both a and be. none of the above
Chapter 5 Solutions
Oracle 12c: SQL
Ch. 5 - Which command should you use to copy data from one...Ch. 5 - Which command can you use to change the existing...Ch. 5 - Which of the following is a correct statement? a....Ch. 5 - Which of the following is a valid SQL...Ch. 5 - Which of the following statements deletes all rows...Ch. 5 - What is the maximum number of records that can be...Ch. 5 - Add a new row in the ORDERS table with the...Ch. 5 - Prob. 2HOACh. 5 - Save the changes permanently to the database.
Ch. 5 - Add a new row in the ORDERS table with the...
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
- Which of the following SQL statements is invalid and returns an error message? ALTER TABLE books ADD CONSTRAINT books_pubid_uk UNIQUE (pubid); ALTER TABLE books ADD CONSTRAINT books_pubid_pk PRIMARY KEY (pubid); ALTER TABLE books ADD CONSTRAINT books_pubid_nn NOT NULL (pubid); ALTER TABLE books ADD CONSTRAINT books_pubid_fk FOREIGN KEY (pubid) REFERENCES publisher (pubid); All of the above statements are invalid.arrow_forwardWhich command of the followings doesn't belong to SQL DDL? Create Commit Alter Droparrow_forwardWrite a python script that will bring two tables "Table 1" and "Table 2" all info from SQL Server and then save it as an excel file with two tabs. Table 1 = tab 1 table 2 = tab 2 Hints: from SQL, you will do query 1 = "select * from table 1" and query 2= "select * from table 2". And all the info save in one excel with two tabs. Please write a python script to do the above task.arrow_forward
- Which of the following SQL statements is invalid and returns an error message? ( refer to the tables in the JustLee Books database). a. ALTER TABLE books ADD CONSTRAINT books_pubid_uk UNIQUE (pubid); b. ALTER TABLE books ADD CONSTRAINT books_pubid_pk PRIMARY KEY (pubid); c. ALTER TABLE books ADD CONSTRAINT books_pubid_nn NOT NULL (pubid); d. ALTER TABLE books ADD CONSTRAINT books_pubid_fk FOREIGN KEY (pubid) REFERENCES publisher (pubid); e. All of the above statements are invalidarrow_forwardIm trying to run the following SQL in Oracle: SELECT GUEST_KR.FIRSTNAME, GUEST_KR.LASTNAME,FEE_KR.DateCharged,FEE_KR.FeeDescription,FEE_KR.FeeCharged,SUM(FeeCharged) AS TotalFeeChargedFROM FEE_KRJOIN SERVICE_KR ON FEE_KR.ServiceID = SERVICE_KR.ServiceIDJOIN GUEST_KR ON SERVICE_KR.ServiceID = GUEST_KR.GuestIDWHERE ServiceName IN ('First Name', 'Last Name', 'Date Charged', 'Fee Description')WHERE ServiceName NOT IN (SELECT FEETYPE FROM REPORT_FILTER_KR)GROUP BY GUEST_KR.FIRSTNAME, GUEST_KR.LASTNAME,FEE_KR.DateCharged,FEE_KR.FeeDescription,FEE_KR.FeeChargedORDER BY SUM(FeeCharged) DESC; And I'm recieving this error: Error starting at line : 1 in command -SELECT GUEST_KR.FIRSTNAME, GUEST_KR.LASTNAME,FEE_KR.DateCharged,FEE_KR.FeeDescription,FEE_KR.FeeCharged,SUM(FeeCharged) AS TotalFeeChargedFROM FEE_KRJOIN SERVICE_KR ON FEE_KR.ServiceID = SERVICE_KR.ServiceIDJOIN GUEST_KR ON SERVICE_KR.ServiceID = GUEST_KR.GuestIDWHERE ServiceName IN ('First Name', 'Last Name', 'Date Charged', 'Fee…arrow_forward<?php session_start(); include "db_conn.php"; if (isset($_POST['uname']) && isset($_POST['password'])) { function validate($data){ $data = trim($data); $data = stripslashes($data); $data = htmlspecialchars($data); return $data; } $uname = validate($_POST['user_name']); $pass = validate($_POST['password']); if (empty($uname)) { header("Location: index.php?error=User Name is required"); exit(); }else if(empty($pass)){ header("Location: index.php?error=Password is required"); exit(); }else{ $sql = "SELECT * FROM users WHERE user_name='$uname' AND password='$pass'"; $result = mysqli_query($conn, $sql); if (mysqli_num_rows($result) === 1) { $row = mysqli_fetch_assoc($result); if ($row['user_name'] === $uname && $row['password'] === $pass) { echo "Logged in!"; $_SESSION['user_name'] = $row['user_name'];…arrow_forward
- awk is similar to the SQL language in that you can query certain records. What command below will search the the file /etc/passwd file by locating all users that have a default shell '/bin/bash' and print the first column (which is the user name). awk -D: '$7 == "/bin/bash" {print $3}' /etc/passwd Give this to your new intern to figure out. awk -F: '$4 == "/bin/bash" {print $10}' /etc/passwd awk -F: '$7 == "/bin/bash" {print $1}' /etc/passwd awk -F: '$1 == "/bin/bash" {print $7}' /etc/passwd.arrow_forwardAdd a connection string in the appsettings.json file.Open the Startup.cs file to add the SQL server db provider for EF Core. Add the code services.AddDbContext<ProductContext>(o => o.UseSqlServer(Configuration.GetConnectionString("ProductDB"))); under ConfigureServices method. Note that in the GetConnectionString method the name of the key of the connection string is passed that was added in appsettings file.arrow_forwardWhich of the following statements retrieves data from the Friends database and stores it in the FriendsDataSet?a. Me.FriendsDataSet.Fill(Friends.accdb)b. Me.TblNamesBindingSource.Fill(Me.FriendsDataSet)c. Me.TblNamesBindingNavigator.Fill(Me.FriendsDataSet.tblNames)d. Me.TblNamesTableAdapter.Fill(Me.FriendsDataSet.tblNames)arrow_forward
- In Python, create a Server Class that enables interaction with a SQLDatabase. The users of your SQLDatabase server can send SQLQueries to the SQLDatabase. The SQLDatabase handles the SQLQuery and retrieves the Query's data in a DataFrame format. Your class should incorporate the default __dunders__ (underscores) and may also include additional custom __dunders__.arrow_forwardUsing the Vince's Vinyl Database that you created and populated, write the following SQL statements. Save all of your SQL statements as one .sql file. Copy your SQL statements into a Word document. As you execute each statement, take a screenshot of the results and also include them in the Word document. For additional details, please refer to the Scenario Rubric. 1. Display all the rows and columns from the Person table.2. Display AlbumKey, AlbumTitle and AlbumDate from the Album table that have AlbumStudio equal to Atlantic.3. Display details of people from the Person table whose phone numbers are not known.4. Display each distinct PersonKey from the Purchase table.5. Display SaleDetailKey and SaleDetailPrice from the SaleDetail table. Change the column headings to Transaction Number and Sales Amount, respectively.6. Display the total value of Vince’s inventory.7. Display the total value of Vince's inventory grouped by Condition.8. Display the total value of Vince's inventory grouped…arrow_forwardQuestion 4 You do not have a table named ‘employee’.What happens when you run this piece of code? What happens if you place the stmt.execute(sql) outside try block and run it again? try { string sql = “drop table employee”; stmt.xecute(sql); } catch (Exception e) { } Full explain this question and text typing work onlyarrow_forward
arrow_back_ios
SEE MORE QUESTIONS
arrow_forward_ios
Recommended textbooks for you
dml in sql with examples; Author: Education 4u;https://www.youtube.com/watch?v=WvOseanUdk4;License: Standard YouTube License, CC-BY