Oracle 12c: SQL
Oracle 12c: SQL
3rd Edition
ISBN: 9781305251038
Author: Joan Casteel
Publisher: Cengage Learning
bartleby

Concept explainers

bartleby

Videos

Textbook Question
Book Icon
Chapter 6, Problem 6HOA

A new table has been requested to support tracking automated emails sent to customers. Create the table and add data as described below.

  • Tablename: email_log
  • Columns: emailid (numeric), emaildate (datetime), customer# (numeric)
  • Primary key: emailid column, define as an Identity Column
  • Add the following data rows and display resulting rows (if any errors occur, explain why the error is expected)
    1. 1. Emaildate = current date, customer# = 1007
    2. 2. Emailid = specify to use the column default value, emaildate = current date, customer# = 1008
    3. 3. Emailid = 25, emaildate = current date, customer# = 1009
Blurred answer
Students have asked these similar questions
A new table has been requested to support tracking automated emails sent to customers. Create the table and add data as described below.• Tablename: email_log• Columns: emailid (numeric), emaildate (datetime), customer# (numeric)• Primary key: emailid column, define as an Identity Column• Add the following data rows and display resulting rows (if any errors occur, explain why the error is expected)1. Emaildate ¼ current date, customer# ¼ 10072. Emailid ¼ specify to use the column default value, emaildate ¼ current date, customer# ¼ 10083. Emailid ¼ 25, emaildate ¼ current date, customer# ¼ 1009 (refer to the tables in the JustLee Books database).
Assume you have these table  CREATE TABLE Student (studid Char(9) Primary Key,FirstName Varchar2(50) NOT NULL,LastName Varchar2(50) NOT NULL,Email Varchar2(50) NOT NULL UNIQUE,PhoneNumber Number(8) NOT NULL UNIQUE,DateOfBirth Date NOT NULL,GPA Number(1,2) NOT NULL); CREATE TABLE Club (clubID Number(3) Primary Key,ClubName Varchar2(20) NOT NULL,studid Char(9) NOT NULL UNIQUE, Foreign key(studid) references Student(studid)); CREATE TABLE MemberOf (ClubID Number(3) Primary Key, Studid char(9), JoiningDate date, Foreign Key(ClubID) references club(clubID), Foreign Key(Studid) references Student(studid)); CREATE TABLE Activities (Actid Number(3) Primary Key,Acdt DATE NOT NULL,Place Varchar2(50) NOT NULL,durationNbHour Number NOT NULL); CREATE TABLE Organize (actid Number(3) Primary Key, clubID Number(3), Fee Number(4,2), Foreign Key(actid) references Activities(Actid),Foreign Key(clubID) references MemberOf(ClubID));   Write in SQL queries to populate the above tables by inserting minimum 4…
Write an anonymous block which updates the .Physician table.(As you can not update the .Physician Table, you will have to create your own table based on the structure and contents of the Physician Table). Use named parameters to get values for Phys_ID, Phys_name, Phys_phone, and Phys_speciality. If the value for Phys_ID is in the Physician Table, Update the values of the remaining columns. If the Phys_ID is not in the Physician Table, INSERT a row into the Physician Table with those values.               - Hint: Use variables for each of the columns above and assign a named parameter to each of             them. Then use the variable in the rest of the block. - Write a simple driver to test the block with a Phys_ID that is in the Physician Table and a    Phys_ID that is not in the Physician Table. Physician Table   Phys_ID               Phys_Name                        Phys_Phone                       Phys_Specialty -----------             ------------------------…
Knowledge Booster
Background pattern image
Computer Science
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
SEE MORE QUESTIONS
Recommended textbooks for you
Text book image
Oracle 12c: SQL
Computer Science
ISBN:9781305251038
Author:Joan Casteel
Publisher:Cengage Learning
Text book image
Np Ms Office 365/Excel 2016 I Ntermed
Computer Science
ISBN:9781337508841
Author:Carey
Publisher:Cengage
dml in sql with examples; Author: Education 4u;https://www.youtube.com/watch?v=WvOseanUdk4;License: Standard YouTube License, CC-BY