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...
Problem 8.2 c from Databases Illuminated Third Edition:Assume you have a statistical database with the following...
Problem 8.2 c from Databases Illuminated Third Edition:Assume you have a statistical database with the following schema. The only legal queries are those involving COUNT, SUM, and AVERAGE. newFaculty(facId, lastName, firstName, department, salary, rank, dateHired) a. Write a legal SQL query to find the salary of the only faculty member who is an instructor in the Art department. b. Assume the system will refuse to answer queries for which only one record satisfies the predicate as in (a). Write a...
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...
JAVA PROGRAMMING: Write a program called TimeSymbolTables that creates three symbol tables, each of a different...
JAVA PROGRAMMING: Write a program called TimeSymbolTables that creates three symbol tables, each of a different implementation. Each symbol table will contain as a key a word read from a text file and as a value the number of times that word occurs in the text file. Have the program fill the first symbol table with these counts, keeping track of how long that takes using a Stopwatch object. It then does the same thing with the second symbol table....
1. From the list below, which term/topic has NOT been discussed in lecture? (type in the...
1. From the list below, which term/topic has NOT been discussed in lecture? (type in the answer area below the one topic from the list of five that has not been discussed) List: looping debugging paging tables precision compiler 2. Write a while loop that accepts integers from the user until a negative number is entered. The prompt should be "Enter a number (negative to quit):" Add up the numbers and print the sum (not including the negative number). Assume...
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...
In the following C code, Which variable if NOT of primitive data type? A. a B....
In the following C code, Which variable if NOT of primitive data type? A. a B. b C. c D. d int a = 10; double b = 20.0; float c = false; char d[5] = "Hello"; // here we define a string In programming language C, the implementation of a string data type is limited dynamic length, which means the length of a string variable is fixed once it has been defined. A. True B. False In C# programming...
ADVERTISEMENT
Need Online Homework Help?

Get Answers For Free
Most questions answered within 1 hours.

Ask a Question
ADVERTISEMENT