Example 1: sql insert query
INSERT INTO table_name (column1, column2, column3, ...)
VALUES (value1, value2, value3, ...);
Example 2: how to add records to sql table
INSERT INTO Customer (FirstName, LastName, City, Country, Phone)
VALUES ('Craig', 'Smith', 'New York', 'USA', 1-01-993 2800)
Example 3: commande sql insert valeu
INSERT INTO client (prenom, nom, ville, age)
VALUES
('Rébecca', 'Armand', 'Saint-Didier-des-Bois', 24),
('Aimée', 'Hebert', 'Marigny-le-Châtel', 36),
('Marielle', 'Ribeiro', 'Maillères', 27),
('Hilaire', 'Savary', 'Conie-Molitard', 58);
Example 4: sql add
Adds a new column to an existing table.
Example: Adds a new column named ‘email_address’ to a table named
‘users’.
ALTER TABLE users
ADD email_address varchar(255);
Example 5: sql insert data
INSERT INTO users (first_name, last_name, address, email)
VALUES (‘Tester’, ‘Jester’, ‘123 Fake Street, Sheffield, United
Kingdom’, ‘test@lukeharrison.dev’);
Example 6: sql add statement access
PARAMETERS LastDateToKeep DateTime;
INSERT INTO tblContactEventsHistory
(ContactID, ContactDateTime, ContactEventType, ContactNotes )
SELECT tblContactEvents.ContactID, tblContactEvents.ContactDateTime,
tlkpContactEventTypes.ContactEventTypeDescription,
tblContactEvents.ContactNotes
FROM tlkpContactEventTypes
INNER JOIN (tblContactEvents
LEFT JOIN tblContactEventsHistory
ON (tblContactEvents.ContactID = tblContactEventsHistory.ContactID)
AND (tblContactEvents.ContactDateTime =
tblContactEventsHistory.ContactDateTime))
ON tlkpContactEventTypes.ContactEventTypeID =
tblContactEvents.ContactEventTypeID
WHERE (tblContactEvents.ContactDateTime<[LastDateToKeep])
AND (tblContactEventsHistory.ContactID Is Null);