1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Blizzard [7]
2 years ago
12

The given SQL creates a Movie table with an auto-incrementing ID column. Write a single INSERT statement immediately after the C

REATE TABLE statement that inserts the following movies:
Title Rating Release Date
Raiders of the Lost Ark PG June 15, 1981
The Godfather R March 24, 1972
The Pursuit of Happyness PG-13 December 15, 2006
Note that dates above need to be converted into YYYY-MM-DD format in the INSERT statement. Run your solution and verify the movies in the result table have the auto-assigned IDs 1, 2, and 3.
CREATE TABLE Movie (
ID INT AUTO_INCREMENT,
Title VARCHAR(100),
Rating CHAR(5) CHECK (Rating IN ('G', 'PG', 'PG-13', 'R')),
ReleaseDate DATE,
PRIMARY KEY (ID)
);
-- Write your INSERT statement here:
Computers and Technology
1 answer:
Snowcat [4.5K]2 years ago
3 0

Answer:

INSERT INTO Movie(Title,Rating,ReleaseDate)

VALUES("Raiders of the Lost ArkPG",'PG',DATE '1981-06-15'),

("The Godfaher",'R',DATE '1972-03-24'),

("The Pursuit of Happyness",'PG-13',DATE '2006-12-15');

Explanation:

The SQL statement uses the "INSERT" clause to added data to the movie table. It uses the single insert statement to add multiple movies by separating the movies in a comma and their details in parenthesis.

You might be interested in
Convert the following four unsigned binary numbers to decimal and show your work:
Ber [7]

Answer:

23 ,21,10,63,13

Explanation:

We have to convert binary to decimal

10111 corresponding decimal number is

1\times 2^4+0\times 2^3+1\times 2^2+1\times 2^1+1\times 2^0=23

10101 corresponding decimal number is

1\times 2^4+0\times 2^3+1\times 2^2+0\times 2^1+1\times 2^0==21

01010 corresponding decimal number is

0\times 2^4+1\times 2^3+0\times 2^2+1\times 2^1+0\times 2^0=10

111111 corresponding decimal number is

1\times 2^5+1\times 2^4+1\times 2^3+1\times 2^2+1\times 2^1+1\times 2^0=63

001111 corresponding decimal number is

0\times 2^5+0\times 2^4+1\times 2^3+1\times 2^2+1\times 2^1+1\times 2^0=13

7 0
3 years ago
Write a program that asks the user to input a set of floating-point values. When the user enters a value that is not a number, g
Lady_Fox [76]

Answer:

Check the explanation

Explanation:

// include the necessary packages

import java.io.*;

import java.util.*;

// Declare a class

public class DataReader

{

// Start the main method.

public static void main(String[] args)

{

// create the object of scanner class.

Scanner scan = new Scanner(System.in);

// Declare variables.

boolean done = false;

boolean done1 = false;

float sum = 0;

double v;

int count = 0;

// start the while loop

while (!done1)

{

// start the do while loop

do

{

// prompt the user to enter the value.

System.out.println("Value:");

// start the try block

try

{

// input number

v = scan.nextDouble();

// calculate the sum

sum = (float) (sum + v);

}

// start the catch block

catch (Exception nfe)

{

// input a character variable(\n)

String ch = scan.nextLine();

// display the statement.

System.out.println(

"Input Error. Try again.");

// count the value.

count++;

break;

}

}

// end do while loop

while (!done);

// Check whether the value of count

// greater than 2 or not.

if (count >= 2)

{

// display the statement on console.

System.out.println("Sum: " + sum);

done1 = true;

}

}

}

}

Sample Output:

Value:

12

Value:

12

Value:

ten

Input Error. Try again.

Value:

5

Value:

nine

Input Error. Try again.

Sum: 29.0

3 0
3 years ago
Read 2 more answers
What is the value of the variable phones after the execution of the following code? phones = {'John': '5555555', 'Julie' : '7777
uysha [10]

Answer:

phones = {'John': '1234567', 'Julie' : '7777777'}

Explanation:

In the code given in the question phones dictionary contains contains two keys John and Julie and have the values '5555555' and '7777777' respectively. Now in the code the key John in the dictionary phones is assigned the value '1234567' .So the value corresponding to the key John becomes '1234567'.

3 0
3 years ago
You're setting up some VMs to test an application you're considering making available to employees of the small company you work
IgorLugansk [536]

Answer:

Snapshots in VirtualBox, Hyper-V, and please check explanation.

Explanation:

You should never test the software on your PC as you never know what virus or threat they bring with them. Even when you are a software company and testing your own new software, you should use the VM, as it is safe. Any adverse effect can be tackled as the VM is made to be destroyed some day.

You can install numerous OS on your VM. The two best are certainly Virtual Box and the Hyper-V from VMWare. Remember, if you dont want to use the licensed version of certain OS, the trial versions are always available for free, and you can install them on the VMs.

There is a snapshot option on the VirtuabBOX. You are only required to create the snapshot after creating and configuring the VM. It supports Windows, Linux and Mac. So you can install almost any OS. However, VMWare Player does not support the Snapshot, but it provides s similar option known as Checkpoints. However, VMware Workstation supports Snapshots, though they might be costly.

If you are on OS X you can make use of Parallels.

However, never enable file sharing, and stay away from Bridge mode as well as never use your original accounts. File sharing will inject the malware if any to all places on network. The bridge mode connects the VM directly to the network, which otherwise remain hidden behind NAT. And use of personal accounts can cost you them, and this can be quite a big loss definitely.  

6 0
3 years ago
Read 2 more answers
18. The push rod connects to the _______, which is designed to pivot back and forth to open and close the valve.
spin [16.1K]
In an overhead valve engine, pushrods connect to A. rocker arm which pivots and opens valves
6 0
3 years ago
Read 2 more answers
Other questions:
  • Which of the following is NOT a common GUI component? O a. Label b. Button c. Key press d. Text box
    12·2 answers
  • What might the purpose be for a sata-style power connector on a motherboard?
    15·1 answer
  • Which osi model layer manages data encryption?
    14·1 answer
  • Twitter is an example of a __________. social bookmarking website social tagging website microblogging website blogging website
    12·1 answer
  • Every node (except of the last node) in a singly linked list contains ____
    5·1 answer
  • Which graph is the solution to the system 2x – 3 and y < 2x + 4?
    5·2 answers
  • Select the correct answer.
    10·1 answer
  • I need neveahbowe to see this.
    10·1 answer
  • How can a search be narrowed to only search a particular website????
    15·1 answer
  • A state government is attempting to reduce the digital divide. Which of the following activities has the greatest potential to c
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!