Download presentation
Presentation is loading. Please wait.
1
Quick-and-dirty
3
Commands end in a semi-colon ◦ If you forget, another prompt line shows up Either continue the command or… End it with a semi-colon ◦ Just like “DOS”… No error message, and another command prompt indicates that the command worked (assumption)
5
Just because it exists doesn’t mean that you’re using it ◦ Issue the “USE DATABASE ” command ◦ Empty database No tables exist in it
6
Use the CREATE TABLE command ◦ For the fields (columns) consider: Names Data type Unique value in that table? Index value? Primary key? Auto Increment? Any default value? Null or not null?
7
Note the continuation line for the command ◦ Field (column) definitions are separated by commas Each field is described SHOW TABLES command is issued to verify the table exists
8
Use the “DESCRIBE” command
9
Use an “INSERT INTO” SQL command Load records from another source ◦ From another table using SQL ◦ From a sequential file using the “LOAD” command
10
parts.txt ◦ Text file ◦ Semi-colon separated values ◦ Lines end on “newline” character
11
Command line interface (MySQL shell) indicated that 3 records were affected Use a “select” query to show the records
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.