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

COMPUTER SOFTWARE APPLICATION - CITS




           EXERCISE 27 : Insert, Update and Delete Queries


            Objectives

            At the end of this exercise you shall be able to
           •  create table and insert the value in the table
           •  update some values in the tables
           •  delete specific tuples from the table

           Requirements

           Tools/Materials

           •   Desktop/Laptop with latest configuration
           •   Operating system: window 10:11
           •  XAMPP server r3.3.0


           Procedure


           TASK 1 :Using next query
           1  Create database:
           Create database database name:
           Use database:

           Use database name;
           2  Create Table:
           CREATE TABLE your table name (
               column1 datatype1,

               column2 datatype2,
               column3 datatype3,
               -- add more columns as needed
               PRIMARY KEY (column1)
           );
           Ex:

           CREATE TABLE `employee` (
             `employee id` bigint unsigned NOT NULL AUTO INCREMENT,
             `first name` varchar(45) NOT NULL,
             `last name` varchar(45) NOT NULL,

             `last update` timestamp NOT NULL DEFAULT CURRENT TIMESTAMP,
             UNIQUE KEY `employee id` (`employee id`)
           );











                                                           84
   94   95   96   97   98   99   100   101   102   103   104