Question

Assume that a table a has been created that has one attribute called a_value of type...

Assume that a table a has been created that has one attribute called a_value of type varchar(20). Records have been inserted, and for one of those records a_value is the string 'Zechariah'. For which of the following queries will this record be returned correctly?

select * from a where a_value like 'Zech%';

select * from a where a_value = 'Zech*';

select * from a where a_value = 'Zech';

select * from a where a_value = 'Zech'*;

Homework Answers

Answer #1
Assume that a table a has been created that has one attribute called a_value of type varchar(20).

Records have been inserted, and for one of those records a_value is the string 'Zechariah'.

queries will this record be returned correctly is
select * from a where a_value like 'Zech%';

So, answer is option 1

select * from a where a_value like 'Zech%';

Know the answer?
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for?
Ask your own homework help question
Similar Questions
Given the following relations about students borrow books from a university library. Student (StudentID: integer, Name:...
Given the following relations about students borrow books from a university library. Student (StudentID: integer, Name: string, EnrollDate: date) Book(Title: string, Author: string, Quantity: integer) BorrowRecord(StudentID: integer, BookTitle: string, BookAuthor: string, BorrowDate: date, DueDate: date, Returned: integer) Note that there are no duplicate records in the three relations, and there can be duplicates of book titles. For Returned, 0 means not returned and 1 indicates the books have been returned. Write the following queries in SQL. (a) Find the StudentIDs...
Write a script to create the following tables with attributes as specified(SQL) Customer table with Customer’s...
Write a script to create the following tables with attributes as specified(SQL) Customer table with Customer’s id, name, address, city as varchar, customer’s date of birth as date type and zip code number where the customers id is the primary key in the table, name and date of birth are mandatory. Id has a 10-character limit, name, address and city have a 50-character limit, zip has a 5-character limit Product Table with Product id, description and finish as varchar, price...
Consider a relational DBMS that has two relations: Emp (employees) and Dept (departments).    Emp(id, name,...
Consider a relational DBMS that has two relations: Emp (employees) and Dept (departments).    Emp(id, name, age, salary, dname)    Dept(dname, location) - The Emp table has 500 tuples, and each tuple has a fixed length of 500 bytes. The primary key attribute "id" has a length of 40 bytes. - The Dept table has 100 tuples, and each tuple has 200 bytes. The primary key attribute "dname" has a length of 20 bytes. For simplicity, we assume each employee...
Table 1 shows the financial position of Bank Uno once $4111.00 has been deposited. Assume that...
Table 1 shows the financial position of Bank Uno once $4111.00 has been deposited. Assume that the required reserve ratio is 9.00%, that banks do not keep excess reserves, and that all the money loaned out from Bank Uno is deposited into Bank Duo (whose loans go to other banks not shown here). Once the lending and depositing process is complete, what will the accounts look like in Tables 2 and 3? Specify all answers to two decimal places. Table...
Table 1 shows the financial position of Bank Uno once $3323.00 has been deposited. Assume that...
Table 1 shows the financial position of Bank Uno once $3323.00 has been deposited. Assume that the required reserve ratio is 6.00%, that banks do not keep excess reserves, and that all the money loaned out from Bank Uno is deposited into Bank Duo (whose loans go to other banks not shown here). Once the lending and depositing process is complete, what will the accounts look like in Tables 2 and 3? Specify all answers to two decimal places. Table...
Lab 5 Queries with Multiple Tables In this lab, we do queries more than one table....
Lab 5 Queries with Multiple Tables In this lab, we do queries more than one table. SQL provides two different techniques for querying data from multiple tables: • The SQL subquery • The SQL join As you will learn, although both work with multiple tables, they are used for slightly different purposes. We used WMCRM database which is what we created in Lab 4. Here is the summary of the database schema (where schema is used in its meaning of...
A drastic turnaround in WSU’s football program has created national and international recognition of WSU. Enrollment...
A drastic turnaround in WSU’s football program has created national and international recognition of WSU. Enrollment has increased significantly, and many new staff and faculty have been hired. As a result, the City of Pullman’s previous population projections are no longer accurate. Find the total capacity of the water towers (reservoirs) in Pullman from the website. Assume this capacity is for one day of usage. Using the City’s 1990 census population, assume it is increasing geometrically to 40,000 in 20...
Nicole's Getaway Spa (NGS) has been so successful that Nicole has decided to expand her spa...
Nicole's Getaway Spa (NGS) has been so successful that Nicole has decided to expand her spa by selling merchandise. She sells things such as nail polish, at-home spa kits, cosmetics, and aromatherapy items. Nicole uses a perpetual inventory system and is starting to realize all of the work that is created when inventory is involved in a business. The following transactions were selected from among those completed by NGS in August. Aug. 2 Sold a bundle of spa services with...
Assume one file has r = 10^6 records. Each record takes R = 100 bytes, of...
Assume one file has r = 10^6 records. Each record takes R = 100 bytes, of which 10 bytes are for the key of the record. Suppose the key values range from 1 through 1,000,000 inclusive. Assume the block size B is 1000 bytes for all files, and that an address (block pointer, tree node pointer, or data record pointer) takes 10 bytes. What is the blocking factor bfr i for the single level index ? How many index blocks...
Each of 13 refrigerators of a certain type has been returned to a distributor because of...
Each of 13 refrigerators of a certain type has been returned to a distributor because of an audible, high-pitched, oscillating noise when the refrigerators are running. Suppose that 10 of these refrigerators have a defective compressor and the other 3 have less serious problems. If the refrigerators are examined in random order, let X be the number among the first 8 examined that have a defective compressor. (a) Calculate P(X = 6) and P(X ≤ 6). (Round your answers to...
ADVERTISEMENT
Need Online Homework Help?

Get Answers For Free
Most questions answered within 1 hours.

Ask a Question
ADVERTISEMENT