Session Score


Membership


Navigate
Current Topic:
View Topic Tree
Everything > Science & Technology > Computers > Programming > SQL

What is the SQL statement for querying a database?
correct answer select
correct answer insert into
correct answer update
correct answer create table
correct answer alter table
Next Question

Explanation

The statement for querying a database in SQL is SELECT.

The act of querying a database simply means getting the particular data that you want out of it. For example, suppose you want to phone a friend but you don't know his number. You must 'query' the phone book for his phone number by using his name as a means for lookup.

If the phone book were a database, it would consist of many rows, one for each person in the phone book. And, it would have at least two columns: one column for each person's name and another column for each person's phone number. Querying the database would amount to finding the row with your friend's name, and then getting the associated phone number in that same row.

Let us assume there is such a table, called phone_book, which has two fields called name and phone_number. Let us further assume that your friend's name is John Doe. The query to find your friend's phone number might look something like this:

SELECT phone_number FROM phone_book WHERE name='John Doe'



Please rate this question and explanation .... ( takes you to the next question >>> )
Excellent Good Bad Terrible

Info
Admin Functions