Step-by-Step Explanation and Sample Table Structure
-
Define Table Name: Enter "Customers" as the name of your table in the provided field.
-
Specify Number of Columns: Indicate that you will define 5 columns (CustomerID, Name, Email, Phone, DateJoined). You can leave this blank if unsure and add columns later.
-
Proceed with Go Button: Click "Go" to move to the column definition screen.
-
Define Each Column:
-
Column 1: CustomerID
- Name: CustomerID
- Type: INT (for integer values)
- Length/Values: No specific length needed as it's an auto-incremented primary key.
-
Column 2: Name
- Name: Name
- Type: VARCHAR(50) (to store names up to 50 characters)
-
Column 3: Email
- Name: Email
- Type: VARCHAR(100) (to accommodate email addresses up to 100 characters)
-
Column 4: Phone
- Name: Phone
- Type: VARCHAR(20) (for phone numbers, typically 10-20 digits)
-
Column 5: DateJoined
- Name: DateJoined
- Type: DATETIME (to store the date and time when a customer joined)
-
Set Defaults and NULLs:
- For "DateJoined", set a default value to '2023-01-01 00:00:00' using SQL syntax.
- Allow NULLs for fields like "Phone" if customers can have no phone number.
-
Save the Table: After defining all columns, click "Save" to create the table structure.
-
Manage Data:
- Use "Insert" action to add new customer records with sample data.
- Utilize "Search" options to query specific customers based on criteria.
- Ensure data integrity by verifying each field's constraints and type.
-
Review and Edit: Access the table structure via the "Structure" action to review column details and make adjustments as needed.