BaşlayınÜcretsiz Başlayın

Inserting and updating a table

A very important task when working with tables is inserting and updating the values in a database. The syntax for both operations is shown below.

Insert value1 and value2 into the Employee table:

INSERT INTO Employee 
VALUES (value1, value2);

Update field1 from table Employee with value1 for the ID=1:

UPDATE Employee 
SET field1 = value1 
WHERE ID = 1;

Your task is to insert two new values into the Person table and to update the entries of the table.

Bu egzersiz

Hierarchical and Recursive Queries in SQL Server

kursunun bir parçasıdır
Kursu Görüntüle

Uygulamalı interaktif egzersiz

Bu örnek kodu tamamlayarak bu egzersizi bitirin.

-- Insert the records for the person with ID=1
___ INTO ___ 
____ (1,'Andrew','Anderson','Union Ave 10','New York','1986-12-30');
-- Insert the records for the person with ID=2
INSERT INTO Person 
VALUES (___,___,___,___,___,___);

SELECT * 
FROM Person;
Kodu Düzenle ve Çalıştır