Головна‎ > ‎SQL‎ > ‎

INSERT INTO

INSERT INTO - додати рядок в таблицю


// незаповнені колонки будуть null 
INSERT INTO Customers (CustomerName, ContactName, Country)
VALUES ('Cardinal''Tom B. Erichsen', 'Norway');




INSERT INTO Customers (CustomerName, ContactName, Address, City, PostalCode, Country)
VALUES ('Cardinal', 'Tom B. Erichsen', 'Skagen 21', 'Stavanger', '4006', 'Norway');







SqlCommand scCommand = new SqlCommand("INSERT INTO Students(Id, FullName, DBO, Gender) VALUES("+tb1.Text+",'"+tb2.Text+"','"+dob.SelectedDate+"','"+cb.IsChecked+"') ", cn_connection);