Exam 1 Jowett: Data Validation Check, Program’s Execution, Web Browser – Flashcards

Unlock all answers in this set

Unlock answers
question
public class First {public static void main(String[] args){ System.out.println("First Java application"); } } ? Given the above code, which item identifies the method's return type? Answers: a. void b. public c. static d. println
answer
a. void
question
public class First { public static void main(String[] args) { System.out.println("First Java application"); } }Given the above code, which item identifies that the method will work without instantiating an object of the class?Answers: a. void b. println c. public d. static
answer
d. static
question
A ____ is an error not detected until the program asks the computer to do something wrong, or even illegal, while executing. Selected Answer: Correctd. run-time error Answers: a. syntax error b. package c. Java API Correctd. run-time error
answer
d. run-time error
question
A program written in ____ is the most basic circuitry-level language. Selected Answer: Correctb. machine language Answers: a. C Correctb. machine language c. BASIC d. Java
answer
b. machine language
question
A(n) ____ defines the circumstances under which a class can be accessed and the other classes that have the right to use a class. Selected Answer: Correctd. access specifier Answers: a. identifier b. Pascal casing c. parameter Correctd. access specifier
answer
d. access specifier
question
After a successful compile, you can run the class file on any computer that has a ____. Selected Answer: Correctd. Java language interpreter Answers: a. Web browser b. DOS c. text editor Correctd. Java language interpreter
answer
d. Java language interpreter
question
If a compiler detects a violation of language rules, it refuses to translate the class to ____. Selected Answer: Correctd. machine code Answers: a. a logic error b. Java c. an application Correctd. machine code
answer
d. machine code
question
If you receive an error that states, "Exception in thread 'main' java.lang.NoClassDefFoundError," when you try to execute the application, you probably do not have your ____ set correctly. Selected Answer: Correctd. class path Answers: a. java b. class length c. object Correctd. class path
answer
d. class path
question
In Java, the reserved keyword ____ means that a method is accessible and usable even though no objects of the class exist. Selected Answer: Correctb. static Answers: a. undefined Correctb. static c. active d. void
answer
b. static
question
In a ____ environment, you can change directories using the cd command. For example, to change to a directory named MyClasses, you type cd MyClasses and press Enter. Selected Answer: Correctc. DOS Answers: a. Windows b. Java Correctc. DOS d. graphical
answer
c. DOS
question
It is a tradition among programmers that the first program you write in any language produces "____" as its output. Selected Answer: Correcta. Hello, world! Answers: Correcta. Hello, world! b. Hello, your name! c. My first program! d. Hi, your name!
answer
a. Hello, world!
question
It is best to use the ____ available text editor when writing Java programs. Answers: a. latest b. best Correctc. simplest d. most complex
answer
c. simplest
question
Java contains a class named ____ that allows you to produce dialog boxes. Selected Answer: Correctc. JOptionPane Answers: a. JGUI b. JBox Correctc. JOptionPane d. JDialog
answer
c. JOptionPane
question
Line comments start with ____. Selected Answer: Correcta. two forward slashes Answers: Correcta. two forward slashes b. a forward slash and two asterisks c. a percent sign d. a forward slash and an asterisk
answer
a. two forward slashes
question
Locating and repairing all syntax errors is part of the process of ____ a program. Selected Answer: Correctb. debugging Answers: a. interpreting Correctb. debugging c. executing d. compiling
answer
b. debugging
question
Programs that are embedded in a Web page are called Java ____. Answers: a. applications b. windowed applications Correctc. applets d. consoles
answer
c. applets
question
When you run a Java application using the ____ command, do not add the .class extension to the filename. Selected Answer: Correctc. java Answers: a. class b. output Correctc. java d. static
answer
c. java
question
Whenever a method requires multiple arguments, the arguments are always separated with ____. Selected Answer: Correctc. commas Answers: a. periods b. brackets Correctc. commas d. forward slashes
answer
c. commas
question
____ are also called modules, methods, functions, and subroutines. Java programmers most frequently use the term "method." Answers: a. Applications b. Classes Correctc. Procedures d. Calls
answer
c. Procedures
question
____ are pieces of information that are sent into, or passed to, a method, usually because the method requires the information to perform its task or carry out its purpose. Selected Answer: Correctd. Arguments Answers: a. Methods b. Objects c. Applets Correctd. Arguments
answer
d. arguments
question
____ describes the feature of languages that allows the same word to be interpreted correctly in different situations based on the context. Selected Answer: Correctb. Polymorphism Answers: a. Insulation Correctb. Polymorphism c. Source code d. Architecturally neutral
answer
b. polymorphism
question
____ is the process the compiler uses to divide your source code into meaningful portions; the message means that the compiler was in the process of analyzing the code when the end of the file was encountered prematurely. Selected Answer: Correctd. Parsing Answers: a. Debugging b. Running c. Compiling Correctd. Parsing
answer
d. parsing
question
____ refers to the hiding of data and methods within an object. Selected Answer: Correcta. Encapsulation Answers: Correcta. Encapsulation b. Inheritance c. Instance d. Passed
answer
a. encapsulation
question
public class First { public static void main(String[] args) { System.out.println("First Java application"); } }Given the above code, which item identifies the name of the class? Selected Answer: Correctc. First Answers: a. public b. static Correctc. First d. void
answer
c. First
question
{ public static void main(String[] args) { System.out.println("First Java application"); } }Given the above code, which item identifies the access specifier? Selected Answer: Correctd. public Answers: a. void b. static c. First Correctd. public
answer
d. public
question
Allow you to assign intuitive names to areas of computer memory
answer
high-level programming languages
question
Any combination of nonprinting characters
answer
whitespace
question
The characteristics that define an object
answer
attributes
question
A low-level programming language
answer
machine language
question
Translates an entire program before carrying out the statement
answer
compiler
question
The rules for the programming language
answer
syntax
question
Hypothetical computer used to run a Java program
answer
JVM
question
Series of characters that will appear in output exactly as entered
answer
Literal string
question
A GUI object resembling a window in which you can place messages you want to display
answer
dialog box
question
A ____ data type can hold 14 or 15 significant digits of accuracy. a. double b. boolean c. char d. float
answer
double
question
A ____ is a named memory location that you can use to store a value. a. reference b. variable c. primitive d. cast
answer
variable
question
A data item is ____ when it cannot be changed while a program is running. a. literal b. constant c. primitive d. variable
answer
constant
question
A(n) ____ dialog box asks a question and provides a text field in which the user can enter a response.
answer
input
question
A(n) ____ dialog box typically displays the options Yes, No, and Cancel.
answer
confirm
question
A(n) ____ variable can hold only one of two values: true or false.
answer
boolean
question
Each primitive type in Java has a corresponding class contained in the java.lang package. These classes are called ____ classes.
answer
type-wrapper
question
In Java, ____ is a built-in class that provides you with the means for storing and manipulating character strings.
answer
string
question
In Java, when a numeric variable is concatenated to a String using the ____, the entire expression becomes a String.
answer
plus sign
question
In Java, you use variables of type ____ to store integers, or whole numbers.
answer
int
question
Primitive types serve as the building blocks for more complex data types, called ____ types.
answer
reference
question
The ____ is the type to which all operands in an expression are converted so that they are compatible with each other.
answer
unifying type
question
The characters ____ move the cursor to the next line when used within a println() statement.
answer
n
question
The percent sign is the ____ operator.
answer
remainder
question
The term ____ refers to the mathematical accuracy of a value.
answer
significant digits
question
What is the value of result after the following statement is executed? int result = 2 + 3 * 4;
answer
14
question
When a numeric variable is concatenated to a String, the entire expression becomes a(n) ____.
answer
string
question
Which escape sequence will move the cursor to the beginning of the current line?
answer
r
question
Which of the following is NOT a component of a variable declaration statement?
answer
symbolic constant
question
You can store any character, including nonprinting characters such as a backspace or a tab, in a(n) ____ variable.
answer
char
question
You may declare an unlimited number of variables in a statement as long as the variables are ____.
answer
the same data type
question
You use ____ operators to perform calculations with values in your programs.
answer
arithmetic
question
You use the ____ data type to hold any single character.
answer
char
question
____ occurs when both of the operands are integers.
answer
integer division
question
____ refers to the order in which values are used with operators.
answer
associativity
question
true or false
answer
boolean
question
The operator that is represented by an equal sign (=)
answer
assignment
question
A programming term for an unknown value
answer
garbage value
question
Java consistently specifies their size and format
answer
primitive type
question
A value that can be used on either side of an operator
answer
operand
question
Rules for the order in which parts of a mathematical expression are evaluated
answer
operator predence
question
A floating-point data type
answer
floart
question
Created by placing the desired result type in parentheses
answer
cast operator
question
Begins with a backslash followed by a character
answer
escape sequence
question
A method header is also called a(n) _____.
answer
declaration
question
A unique identifier is most likely used as a ____ key in a database.
answer
primary
question
A(n) ____ causes a value to be sent from a called method back to the calling environment.
answer
return statement
question
A(n) ____ is a program module that contains a series of statements that carry out a task.
answer
method
question
A(n) ____ method is a method that creates and initializes class objects.
answer
constructor
question
A(n) ____ variable is known only within the boundaries of the method.
answer
local
question
After an object has been instantiated, its methods can be accessed using the object's _____, a dot, and a method call.
answer
identifier (aka "name")
question
Assigning ____ to a field means that no other classes can access the field's values.
answer
private access
question
Data items you use in a call to a method are called ____.
answer
arguments
question
Every object is a _____ of a more general class.
answer
member
question
For ease in locating class methods, many programmers store them in ____ order.
answer
alphabetical
question
In order to allocate the needed memory for an object, you must use the ____ operator.
answer
new
question
Method names that begin with ____ and set are very typical.
answer
get
question
Methods that retrieve values are called ____ methods.
answer
accessor
question
Methods used with object instantiations are called ____ methods.
answer
instance
question
Public classes are accessible by all objects, which means that public classes can be ____, or used as a basis for any other class.
answer
extended
question
The ____ method executes first in an application, regardless of where you physically place it within its class.
answer
main()
question
The arguments in a method call are often referred to as ____.
answer
actual parameters
question
The name of the ____ is always the same as the name of the class whose objects it constructs.
answer
constructor
question
When a variable ceases to exist at the end of a method, programmers say the variable ____.
answer
goes out of scope
question
____ is a principle of object-oriented programming that describes the encapsulation of method details within a class.
answer
implementation hiding
question
____ parameters are variables in a method declaration that accept the values from the actual parameters.
answer
formal
question
A locally declared variable always ____ another variable with the same name elsewhere in the class.
answer
masks
question
A method can receive ____ arguments, even if it is defined as needing double arguments.
answer
integer
question
A variable comes into existence, or ____, when you declare it.
answer
comes into scope
question
Another name for a nonstatic member class is a(n) ____.
answer
inner class
question
Due to automatic type promotion, when a method with a double parameter is passed an integer, the integer will be promoted to a(n) ____.
answer
double
question
If a class's only constructor requires an argument, you must provide an argument for every ____ of the class that you create.
answer
object
question
If you want all objects to share a single nonchanging value, then the field is static and ______.
answer
final
question
It is a convenience to be able to use one reasonable name for ____ that are functionally identical except for argument types.
answer
tasks
question
It is not necessary to create an instance of the Math class because the constants and methods of the class are ____.
answer
static
question
Object-oriented programmers use the term ____ when a child class contains a field or method that has the same name as one in the parent class.
answer
override
question
The ____ package contains is implicitly imported into Java programs and is the only automatically imported, named package.
answer
java.lang
question
The ____ statement notifies the program that you will be using the data and method names that are part of the imported class or package.
answer
import
question
The compiler determines which version of a method to call by the method's ____.
answer
signature
question
The reference to an object that is passed to any object's nonstatic class method is called the ____.
answer
this reference
question
When an application contains just one version of a method, you can call the method using a(n) ____ of the correct data type.
answer
parameter
question
When an object of one class is a data field within another class, they are related by ____.
answer
composition
question
When calling this() from a constructor, it must be the ____ statement within the constructor.
answer
first
question
When they have the same name, variables within ____ of a class override the class's fields.
answer
methods
question
When you instantiate an object from a class, ____ is reserved for each instance field in the class.
answer
memory
question
When you properly ____ a method, you can call it providing different argument lists, and the appropriate version of the method executes.
answer
overload
question
Within any class or method, the code between a pair of curly braces is called a(n) ____.
answer
block
question
You can use ____ arguments to initialize field values, but you can also use arguments for any other purpose.
answer
constructor
question
You can use the asterisk (*) as a ____, which indicates that it can be replaced by any set of characters.
answer
wildcard symbol
question
____ involves using one term to indicate diverse meanings, or writing multiple methods with the same name but with different parameter lists.
answer
overloading
question
____ variables are variables that are shared by every instantiation of a class.
answer
class
question
A variable comes into existence
answer
comes into scope
question
Using one term to indicate diverse meanings
answer
overloading
question
Must be explicitly named in an import statement
answer
optional classes
question
Starts with the second opening curly brace and ends with the first closing curly brace
answer
inner block
question
Describes the relationship between classes when an object of one class is a data field within another class
answer
composition
question
Defines mathematical constants such as PI
answer
math class
question
Useful when working with dates and times
answer
java.time
question
No object associated with them
answer
class methods
question
Created using the keyword final
answer
constant
question
Using the flowchart above, which decision statement will correctly check that hoursWorked is greater than or equal to the FULL_WEEK constant?
answer
hoursWorked ;= FULL_WEEK
question
A ____ checks a value, and based on the result performs one of two actions.
answer
decision structure
question
A ____ consists of written steps in diagram form, as a series of shapes connected by arrows.
answer
flowchart
question
A logical structure called a(n) ____ structure is when one step follows another unconditionally.
answer
sequence
question
A(n) ____ is a series of if statements that determine whether a value falls within a specified range.
answer
range check
question
A(n) ____ statement is the decision structure you use when you need to take one or the other of two possible courses of action.
answer
dual-alternative if
question
Just as you can block statements that depend on an if, you can also block statements that depend on a(n) ____.
answer
else
question
Statements in which an if structure is contained inside another if structure are commonly called ____ if statements.
answer
nested
question
The AND operator is written as two ____.
answer
ampersands
question
The ____ operator is always evaluated before the OR operator.
answer
AND
question
The ____ operator is written as the exclamation point ( ! ).
answer
NOT
question
The ____ requires three expressions separated with a question mark and a colon.
answer
conditional operator
question
The ____ statement is useful when you need to test a single variable against a series of exact integer, character, or string values.
answer
switch
question
The compiler does not take indentation into account when compiling code, but consistent indentation can help readers understand a program's ____.
answer
logic
question
The simplest statement you can use to make a decision is the ____ statement.
answer
if
question
When an expression containing a ____ is part of an if statement, the assignment is illegal.
answer
single equal sign
question
When using equals and not equals for comparisons with objects, you compare the objects' ____ instead of actual values.
answer
memory addresses
question
When working with logical operators, you can always use ____ to change precedence.
answer
parentheses
question
When you block statements, you must remember that any ____ you declare within a block is local to that block.
answer
variable
question
When you execute an if...else statement, only one of the resulting actions takes place depending on the evaluation of the ____ following the if.
answer
boolean expression
question
When you place a block within an if statement, it is crucial to place the ____ correctly.
answer
curly braces
question
When you use the ;; operator, you must include a complete _____ on each side.
answer
boolean expression
question
In Java, you can leave out the ____ statements in a switch structure.
answer
break
question
You can use the ____, which is written as ||, if you want some action to occur when at least one of two conditions is true.
answer
conditional OR operator
question
if (quotaAmt ; 100 || sales ; 100 ;; productCode == "C") bonusAmt = 50;?When the above code is executed, which operator is evaluated first?
answer
;;
question
true and false
answer
boolean values
question
a double equal sign
answer
equality
question
two possible courses of action
answer
dual-alternative
question
two ampersands
answer
logical AND operator
question
used in the OR operator
answer
pipes
question
; or ;
answer
relational operator
question
An alternative to using a series of nested if statements
answer
switch statement
question
Separated with a question mark and a colon
answer
conditional operator
question
The logical NOT operator
answer
!
question
A ____ is a structure that allows repeated execution of a block of statements.
answer
loop
question
A for loop provides a convenient way to create a(n) ____ loop.
answer
counter-controlled
question
A loop that never ends is called a(n) ____ loop.
answer
infinite
question
A(n) ____ loop is a special loop that is used when a definite number of loop iterations is required.
answer
for
question
A(n) ____ loop is one that performs no actions other than looping.
answer
do-nothing
question
An indefinite loop is a(n) ____ loop.
answer
event-controlled
question
As long as methods do not depend on one another, ____ is a technique that can improve loop performance by combining two loops into one.
answer
loop fusion
question
How many times will outputLabel be called? for(customer = 1; customer ;= 20; ++customer) for(color = 1; color ;= 3; ++color) outputLabel();
answer
60
question
In a do...while loop, the loop will continue to execute until ____.
answer
the loop control variable is false
question
In the expressions b = 8 and c = --b, what value will be assigned to the variable c?
answer
7
question
It is important that the loop control ____ be altered within the body of the loop.
answer
variable
question
On many keyboards (though, *not* Mac laptops :(, the Break key is also the ____ key (Internet research answer).
answer
pause
question
The ____ loop checks the value of the loop control variable at the bottom of the loop after one repetition has occurred.
answer
do...while
question
The order of the conditional expressions in the following is most important within a(n) ____ loop. while(requestedNum ; LIMIT || requestedNum ; 0)...
answer
nested
question
The process of repeatedly increasing a value by some amount is known as ____.
answer
accumulating
question
Use a(n) ____ loop to execute a body of statements continually as long as the Boolean expression that controls entry into the loop continues to be true.
answer
while
question
When creating a for loop, which statement will correctly assign values to more than one variable?
answer
for(a=1, b=2)
question
When you want to increase a variable's value by exactly 1, use the ____.
answer
prefix increment operator
question
Which is an infinite loop?
answer
loopCount = 1; while(loopCount < 3); { System.out.println("Hello"); }
question
Which of the following is NOT a valid method to increase a variable named score by 1?
answer
++score = score + 1
question
You can initialize more than one variable in a for loop by placing a(n) ____ between the separate statements.
answer
comma
question
You use a unary minus sign preceding a value to make the value ____.
answer
negative
question
____ is the process of ensuring that a value falls within a specified range.
answer
validating data
question
Multiple statements within curly braces
answer
block
question
The value that determines whether loop execution continues
answer
loop control variable
question
Subtracting 1 from a variable
answer
decrementing
question
A countered loop
answer
definite loop
question
A shortcut for incrementing and accumulating
answer
prefix ++
question
Operate on two values
answer
binary operators
question
Within parentheses are three sections separated by exactly two semicolons
answer
for loop
question
Part of the Thread class in the java.lang package
answer
sleep() method
question
The technique of combining two loops into one
answer
loop fusion
question
A JavaBean, or bean, is a Java class that
answer
none of the above
question
a servlet
answer
runs on a server
question
A set of pages that are generated in response to user requests is called a/an
answer
web application
question
A web application is a type of
answer
client/server application
question
After you edit a web.xml file, you can check to see if it is still valid by checking it against its
answer
XML schema
question
An HTML form contains one or more controls like
answer
all of the above
question
an HTTP request
answer
is sent from the web browser to a web server
question
For web applications, data can be stored in
answer
all of the above
question
In HTML, these do not display on their own lines in browsers.
answer
inline elements
question
Since the web.xml file describes how the web application should be configured when it is deployed on a server, the file is known as the
answer
deployment descriptor
question
The HTML5 semantic elements include the
answer
all of the above
question
The controller manages the flow of the application, and this work is done by one or more
answer
servlets
question
The presentation layer for a typical servlet/JSP web application consists of
answer
HTML pages and JSPs
question
The specification that describes how web servers can interact with all Java web technolgies is know as
answer
The Java Enterprise Edition (Java EE)
question
To develop Java web applications, you can use an Integrated Development Environment (IDE) such as:
answer
NetBeans or Eclipse
question
To transfer your web application files to a web server, you can use a/an ___________ client such as FileZilla.
answer
FTP
question
when you use the MVC patterns, you
answer
make ech layer as independent as possible
question
Which of the following is not a benefit of using the MVC pattern for an application?
answer
it requires less code
question
Which statement is true for the order in which styles override other styles when you use CSS?
answer
more specific styles override less specific styles
question
You can use tables to organize data in
answer
rows and columns
question
To minimize the amount of Java code in your JSPs, you
answer
use servlets to handle the processing requirements
question
When you use the MVC pattern, the controller directs the flow of control to
answer
the view and the model
question
Which directory stores the Java classes of a servlet/JSP application?
answer
WEB-INFclasses
question
Which of the following is an API for working with databases?
answer
JSF
question
A JavaBean is a Java class that
answer
all of the above
question
A servlet is a Java class that extends the
answer
HttpServlet class
question
Before you can use the core JSTL tags in a JSP, you must code a/an ________________ for the core JSTL library.
answer
taglib directive
question
EL makes it easy to access the _______________ of JavaBeans.
answer
properties
question
If the following JSP tag is coded in a JSP named index.jsp, what happens when the reports.jsp file is updated?
answer
the changes appear for subsequent requests for the index.jsp file
question
In the code that follows, DiagnoseTrouble DiagnoseTrouble /diagnostics/diagnoseTrouble
answer
is the internal name for the servlet class that's used in the deployment descriptor
question
In the code that follows, the servlet is mapped to DiagnoseTrouble /diagnostics/diagnoseTrouble
answer
the /diagnostics/diagnoseTrouble URL of the document root directory
question
The advantages of EL are
answer
all of the above
question
The following code from a servlet class System.out.println("Check with system administrator");
answer
prints text to the standard output stream
question
The following code String[] mailTypes = request.getParameterValues("mail");
answer
returns all values of the mail parameter or null if none exist
question
The init method of a servlet class is called
answer
the first time a servlet is requested but before the service method
question
To define a/an ________________ initialization parameter that's available to all servlets in the web application, you code a/an ________________ element.
answer
context, context-param
question
To define a/an ________________ initialization parameter that's available to a specific servlet, you can code a/an ________________ element within a servlet element.
answer
servlet, init-param
question
When the doGet method of a servlet is called, it receives
answer
the request and response objects
question
Whenever you us EL, you begin by coding a
answer
dollar sign
question
Which of the following is a valid JSP comment?
answer
;%-- comment --%>
question
Which of the following is a valid Java comment?
answer
// comment
question
Which of the following statements gets the value of the parameter named occupation?
answer
String occupation = request.getParameter("occupation");
question
You can use ________________ to perform data validation on the server.
answer
a servlet
question
You can use ________________, or ________________ to perform data validation on the client.
answer
Javascript, jQuery
question
________________ provides a compact syntax that lets you get data from a JavaBean that has been stored as an attribute of the request.
answer
Expression Language (EL)
question
___________________ provides tags for common tasks that need to be performed in JSPs.
answer
The JSP Standard Tag Library (JSTL)
question
A servlet can retrieve the current session object by using the getSession method of the
answer
the request object
question
a session ends when
answer
both a and b
question
a session object is created
answer
the first time a browser makes a request to a site
question
cookies are stored
answer
on the client
question
If you use the MVC pattern with EL,
answer
the servlets create the JavaBeans and set the bean properties
question
persistent cookies
answer
exist after the session ends
question
The JSP Expression Language (EL) provides a compact syntax that lets you get data from
answer
all of the above
question
The advantages of using hidden fields over URL rewriting to pass parameters from a browser to the server are
answer
both a and c
question
The current session object is available
answer
to both servlets and JSPs
question
The initParam implicit object lets you use EL
answer
to get the value of a context initialization parameter
question
The paramValues implicit object lets you use EL
answer
to get the values of request parameters
question
The types of scope that can be used with EL are
answer
page, request, session, and application
question
To create a persistent cookie, set the cookie's maximum age to
answer
a positive number
question
When you set an attribute in the request object, the attributes are ________________.
answer
removed when the request has been completed
question
When you set an attribute in the session object, the attributes are
answer
all of the above
question
Which statement is true?
answer
HTTP maintains state
question
The following link demonstrates how to use View your schedule
answer
URL rewriting
question
The cookie named mediaCookie in the following statement can be accessed by mediaCookie.setPath("/");
answer
the entire web application
question
Which of the following is the correct EL code for getting the value of a cookie named userPreference?
answer
${cookie.userPreference.value}
question
You can use the implicit EL objects to work with
answer
all of the above
question
List only the pet store IDs, full address, and phone number for all of the pet stores.
answer
select pst_id, pst_street, pst_city, pst_state, pst_zip, pst_phone from petstore;
question
Display the pet store name, along with the number of pets each pet store has.
answer
select pst_name, count(pet_id) as `number of pets` from petstore natural join pet group by pst_id;
question
List each pet store ID, along with all of the customer first, last names and balances associated with each pet store.
answer
select pst_id, cus_fname, cus_lname, cus_balance from petstore natural join pet natural join customer;
question
Update the customer last name to 'Valens' for Customer #2.
answer
update customer set cus_lname='Valens' where cus_id=2;
question
Remove Pet #4
answer
delete from pet where pet_id=4;
question
Add two more customers.
answer
insert into customer values (null, 'John', 'Doe', '123 Main St.', 'Tallahassee', 'FL', 324035467, 8509871234, '[email protected]', 101.67, 593.42, 'testing1'), (null, 'Jane', 'Doe', '456 Oak St.', 'Chipley', 'FL', 327199164, 8506752645, '[email protected]', 242.19, 841.01, 'testing2');
Get an explanation on any task
Get unstuck with the help of our AI assistant in seconds
New