Appendix C: MySQL Primer 767 The Preceding Commands |
|
October 31, 2007 |
Appendix C: MySQL Primer 767 The preceding commands display the following: mysql> show tables; | Tables_in_store | | customers | 1 row in set (0.00 sec) Viewing table descriptions To find out information about a table, run the following command: desc table_name; For example: mysql> use store; mysql> desc customers; The preceding commands display the following: | Field | Type | Null | Key | Default | Extra | | name | char(40) | | | | | | address | char(80) | YES | | NULL | | | telephone | char(13) | YES | | NULL | | | id | int(11) | | PRI | NULL | auto_increment | 4 rows in set (0.00 sec) Inserting data into a database To insert data in a table, you need to know the field names and their types, and then use the INSERT statement. Use the desc table_name command to find this information, and then you can run the following: insert into table_name (comma separated field list) values(properly quoted and comma separated value list);
Note: If you are looking for good and high quality web space to host and run your application check Lunarwebhost Linux Hosting services
Tag: php hosting



October 31, 2007
Leave a Reply