MySQL INSERT Example

INSERT - Row

Insert a row of data. Note: the minimum requirements for and insert must include columns that are part of the primary key, part of indexes where no duplicates are allowed, and all columns that cannot be null.

START TRANSACTION
GO

INSERT INTO courses
     (
        course_designater               ,
        course_name                     ,
        education_delivery_method       ,
        course_description_short        ,
        course_description_long         ,
        course_syllabus_attachment      ,
        course_materials_zip_attachment ,
        course_materials_location       ,
        max_recommended_enrollment      ,
        convenings                      ,
        convenings_details              ,
        convenings_consecutive_flg      ,
        typical_preclass_prep_time      ,
        typical_postclass_prep_time     ,
        typical_convening_time          ,
        sponser_name                    ,
        active_flg                      ,
        inactive_date                   ,
        inactive_reason                 ,
        employee_inactivating           
     ) 
VALUES
     (
        'Excel205' , 
        'Intermediate Excel' , 
        'Classroom' , 
        NULL , 
        NULL , 
        'ThirdPartyEduc\OfficeAssoc\IntermedToExcel.pdf' , 
        NULL , 
        NULL , 
        12 , 
        3 , 
        NULL , 
        1 , 
        NULL , 
        NULL , 
        NULL , 
        NULL , 
        1 , 
        NULL , 
        NULL , 
        0 
     ) 
GO

COMMIT 
GO
 Collapse All    Expand All
Custom Search

MySQL Information and Resources