Page 81 - Computer Software Application TP - Volume 1
P. 81

COMPUTER SOFTWARE APPLICATION - CITS



           Step 6: Insert Data into the Table:

           Once the table is created, you can insert data using the INSERT INTO statement:
           INSERT INTO people (id, name, occupation, age)
           VALUES (101, ‘Peter’, ‘Engineer’, 32);


































           Step 7: Retrieve Data from the Table:
           Use the SELECT statement to retrieve data from the table:
           SELECT * FROM users;
           Step 8: Update and Delete Data:
           Modify existing data using the UPDATE statement and remove data using the DELETE statement:
           UPDATE trainer SET email = ‘mike@tutorialandexamples.com’ WHERE course name = ‘Java’;


























           DELETE FROM city WHERE ID = 500;







                                                           66
                               CITS : IT & ITES - Computer Software Application - Exercise 21
   76   77   78   79   80   81   82   83   84   85   86