PhpMyAdmin SQL code not showing up when creating new database and table

Christopher Adams

I'm using WampServer with phpmyadmin, but have also tried Xamp and same results.

I have 6 entries in the table called employees:
I have a table called employee with entries:

empId, lastName, firstName, department, position, and salary.


empId is primary key w/ auto increment. I'm following a tutorial online where they are using a mac computer, I'm on windows, in case that has something to do with the issue.

When I look at the SQL this produces it shows this:

SELECT * FROM `employee` WHERE 1


I don't see any CreateTable or other SQL.
Can anyone shed some light as to what is going on here? Thank you.

UPDATE:
So if I go to > Export to SQL:

And this is what I get:

CREATE TABLE IF NOT EXISTS employee (
empId int(11) NOT NULL,
  lastName varchar(40) NOT NULL,
  firstName varchar(20) NOT NULL,
  department int(2) NOT NULL,
  position varchar(20) NOT NULL,
  salary int(10) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;


ALTER TABLE employee
 ADD PRIMARY KEY (empI);


Which looks like the correct SQL.
So at least I know it is creating the correct SQL even though its not showing on the phpmyadmin web gui page.

GolezTrol

A CREATE TABLE statement is just a command to create a table. You can also create a table using the GUI of PHPMyAdmin, in which case it performs the necessary actions for you.

But those are just commands, blue-prints if you like. In the database itself the 'Create table' statement doesn't exist. The database contains an actual table which was created using such a statement. When you export the database (like you did) or ask for the create table statement, it just reverse-engineers the actual table structure into a statement, like drawing a blue-print based on an actual object you have.

PHPMyAdmin will often show the statement that it generated to build -for instance- a table, but in some cases you may not see it. It might be that the guy of the tutorial has a slightly different version of PHPMyAdmin, or he activated a feature that shows the statement.

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

Creating a new database and new connection in Oracle SQL Developer

From Dev

Error when importing sql database from phpmyadmin

From Dev

EF Requiring primary key when creating a new entry in sql table

From Dev

creating table with phpmyadmin

From Dev

Creating Database Table From Temp-Table (by Code)

From Dev

PHP MySQL database not creating new table

From Dev

Creating a new table in database with description from existing table as an input

From Dev

Status Code 16 when creating new GoogleApiClient

From Dev

SQL Error when creating a table

From Dev

#1089 Error when creating table in phpMyAdmin

From Dev

error in SQL syntax creating a database table

From Dev

SQL showing an error when creating table with columns that have the data type longtext

From Dev

New Grails domain class is not creating a table in the database

From Dev

Null values in database table when creating an entity

From Dev

MySQL error when creating table with phpmyadmin #1016

From Dev

Table with information from database not showing up : System.NullReferenceException

From Dev

How do I generate a new table to a DB using SQL in phpmyadmin?

From Dev

sql Employee database: creating activity/milestone table

From Dev

Creating Database Table From Temp-Table (by Code)

From Dev

PHP MySQL database not creating new table

From Dev

Tables not showing anything when creating new one

From Dev

Creating a new table in phpMyAdmin but clicking a submit button in HTML

From Dev

Status Code 16 when creating new GoogleApiClient

From Dev

String not showing up correctly when queried from a database

From Dev

creating a new table, from various tables in sql

From Dev

why table is not creating in phpmyadmin

From Dev

Database information not lining up in a table (php/sql)

From Dev

Wordpress Plugin Development - Creating a new Table in Database

From Dev

When creating a new big query external table with parquet files on gcs. Showing error

Related Related

  1. 1

    Creating a new database and new connection in Oracle SQL Developer

  2. 2

    Error when importing sql database from phpmyadmin

  3. 3

    EF Requiring primary key when creating a new entry in sql table

  4. 4

    creating table with phpmyadmin

  5. 5

    Creating Database Table From Temp-Table (by Code)

  6. 6

    PHP MySQL database not creating new table

  7. 7

    Creating a new table in database with description from existing table as an input

  8. 8

    Status Code 16 when creating new GoogleApiClient

  9. 9

    SQL Error when creating a table

  10. 10

    #1089 Error when creating table in phpMyAdmin

  11. 11

    error in SQL syntax creating a database table

  12. 12

    SQL showing an error when creating table with columns that have the data type longtext

  13. 13

    New Grails domain class is not creating a table in the database

  14. 14

    Null values in database table when creating an entity

  15. 15

    MySQL error when creating table with phpmyadmin #1016

  16. 16

    Table with information from database not showing up : System.NullReferenceException

  17. 17

    How do I generate a new table to a DB using SQL in phpmyadmin?

  18. 18

    sql Employee database: creating activity/milestone table

  19. 19

    Creating Database Table From Temp-Table (by Code)

  20. 20

    PHP MySQL database not creating new table

  21. 21

    Tables not showing anything when creating new one

  22. 22

    Creating a new table in phpMyAdmin but clicking a submit button in HTML

  23. 23

    Status Code 16 when creating new GoogleApiClient

  24. 24

    String not showing up correctly when queried from a database

  25. 25

    creating a new table, from various tables in sql

  26. 26

    why table is not creating in phpmyadmin

  27. 27

    Database information not lining up in a table (php/sql)

  28. 28

    Wordpress Plugin Development - Creating a new Table in Database

  29. 29

    When creating a new big query external table with parquet files on gcs. Showing error

HotTag

Archive