Session Score


Membership


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

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

Explanation

The statement for putting a new record into a database in SQL is INSERT INTO.

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. Putting a new record into the database is required whenever someone new moves into the area.

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 a new person has moved into the are and his name is John Doe. The SQL instruction to put that new person's phone number into the database might look something like this:

INSERT INTO phone_book (name, phone_number) VALUES (name='John Doe', phone_number='555-1212')

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.



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

Info
Admin Functions