First, there are two ways to insert database content:
1. Single row insert:
E.g:
use Student // run the created database
INSERT INTO Authors(AuthorName,Sex,Age, Email, )
VALUES('Zhang San', 1, '18', '[email protected]',)
2. Multi-line insert:
E.g:
use Student // run the created database
INSERT INTO Authors(AuthorName,Sex,Age, Email, )
SELECT 'Zhang San', 1, '18', '[email protected]' UNION
SELECT 'Li Si', 1, '20', '[email protected]' UNION
SELECT 'Wang Wu', 1, '23', '[email protected]'
2. Deletion of database content:
E.g:
DELETE FROM Books WHERE BookCode='9875644'
3. Modification of database content:
E.g:
UPDATE Authors SET Age =36 WHERE AuthorID=2 //Change the age of AuthorID 2 to 36