Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

What is wrong with this T-SQL statement? Select * from dbo.book where * in ('two towers','hello kitty'); The book titles are not in double quotes.

What is wrong with this T-SQL statement?

Select * from dbo.book where * in ('two towers','hello kitty');

The book titles are not in double quotes.

You must use a column before the in keyword in, not a *

You can't have 2 values in a where in clause

The values should be separated by a semicolon, not a comma

10 points

Question 2

When you write a query joining 2 tables, you can choose from several different types of joins. When you use the keyword join by itself, it is equivalent to another type of join. Select the statement that is equal to this statement.

Select * from tableName1 join tableName2 on tableName1.col1 = tableName2.col4;

Select * from tableName1 inner join tableName2 on tableName1.col1 = tableName2.col4;

Select * from tableName1 outer join tableName2 on tableName1.col1 = tableName2.col4;

Select * from tableName1 right join tableName2 on tableName1.col1 = tableName2.col4;

Select * from tableName1 left join tableName2 on tableName1.col1 = tableName2.col4;

10 points

Question 3

Database inserts are important to add data to the database. Select the insert that is correct based on the following database table create statement.

create table person(id bigint, first_name varchar(100), last_name varchar(100), street_address varchar(200), city varchar(100), state varchar(50), zip int);

insert into person(id bigint, first_name varchar(100), last_name varchar(100), street_address varchar(200), city varchar(100), state varchar(50), zip int)values(1,'Billy','Meyers','1001 Charleston','Cincinnati','OHIO',451001);

insert into person(id, first_name, last_name, street_address, city, state, zip) values(1,'Billy','Meyers','1001 Charleston','Cincinnati','OHIO',451001);

insert into person(id, first_name, last_name, street_address, city, state, zip) values(1,Billy,Meyers,1001 Charleston,Cincinnati,OHIO,451001);

insert into person(id, first_name, last_name, street_address, city, state, zip) values(1,[Billy],[Meyers],[1001 Charleston],[Cincinnati],[OHIO],451001);

10 points

Question 4

A where clause is used to limit the number of rows returned in a result set.

True

False

10 points

Question 5

We are going to try to find Jackie Joyner-Kersee via a LastName column. You know the name ends with Kersee and the surname is hyphenated. Select the where clause that will search all of the customer rows looking for anything prefixing -Kersee.

WHERE CustomerLastName LIKE '%-Kersee'

WHERE CustomerLastName LIKE '_-Kersee'

WHERE CustomerLastName LIKE '*-Kersee'

WHERE CustomerLastName = '%-Kersee'

10 points

Question 6

When you are querying data from a database table(s), you often want to sort the data by one or more columns. Choose the clause you will use in a select statement to order the results by one or more columns.

group by

order

order by

group

10 points

Question 7

Choose the statement that will find the records in the customer table that have a value in the first_name column.

select * from customer where first_name is null;

select * from customer where first_name <> null;

select * from customer where first_name like '%not null';

select * from customer where first_name is not null;

10 points

Question 8

If I have the following join statement, logically I want to get what kind of results?

select * from customer outer join account on customer.id = account.person;

The customers that don't have an account and the accounts that don't have a customer

The customers that have an account

The accounts that don't have a customer

The customers that don't have an account

10 points

Question 9

This update statement is written correctly.

update customer set first_name = 'Rebekah' where first_name = 'rebekah';

True

False

10 points

Question 10

This delete statement is written correctly.

delete from customer;

True

False

NEED HELP ASAP PLS

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Horse Betting The Road To Absolute Horse Racing 2

Authors: NAKAGAWA,YUKIO

1st Edition

B0CFZN219G, 979-8856410593

More Books

Students also viewed these Databases questions

Question

3. How can firms assess the business value of information systems?

Answered: 1 week ago

Question

How do modern Dashboards differ from earlier implementations?

Answered: 1 week ago