Basic HTML Version

|  | Table of Contents |  | View Full Version

Page 137 - CodePilot V5.0 C8
P. 137

    INSERTING DATA TO SPECIFIC COLUMN
                     To insert data into specific columns, list only those columns in the INSERT statement. The remaining

                     columns will be set to their default values or left NULL.
                     The syntax for inserting into specific columns is as follows:

                     INSERT INTO table_name (column1, column2, ...)
                     VALUES (value1, value2, ...);
                     The command to insert data into specific columns of a table is as follows:

                            RETRIEVING DATA FROM TABLE

                     Retrieving data from a table involves using commands to fetch specific or all records stored in it.
                     This helps in viewing and analysing the required information easily.

                     THE SELECT COMMAND

                     The SELECT command retrieves zero or more rows from a table. It used to join information from

                     different tables and filter specific information as per the required criteria.
                     The syntax to use the SELECT command as follows:

                     SELECT * FROM table_name;
                     Where, * is used to select all the columns of the specified table.

                     To display all the data in the table, the SELECT command will be as follows:

                                                                                                                      135
                                                                                              MySQL: My First Database

| 132 133 134 135 136 137 138 139 140 141 142 |