Jump to content


Photo

Chapter 2: Creating Table In Mysql And Creating Database


  • Please log in to reply
1 reply to this topic

#1 Pusk Raketi

Pusk Raketi

    New Member

  • Members
  • Pip
  • 1 posts

Posted 04 August 2015 - 12:28 AM

I'm trying to create new table online in window.

Running PHPMyAdmin

Window SQL Requests

Code:

mysql>CREATE TABLE `aliens_abduction` (
`first_name` VARCHAR (30) ,
`last_name` VARCHAR (30) ,
`when_it_happened`  varchar (30) ,
`how_long`  VARCHAR (30) ,
`how_many VARCHAR (30) ,
`alien_description` VARCHAR (100) ,
`what_they_did` VARCHAR (100) ,
`fang_spotted`  VARCHAR (10) ,
`other`  VARCHAR (100) ,
`email`  VARCHAR (50) ,
) ;

phpmyadmin saying:

#1064 - You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'alien_description` VARCHAR (100) , `what_they_did` VARCHAR (100) , `fang_spott' at line 6

 

trying to create database:

mysql> CREATE DATABASE aliendatabase;

phpmyadmin saying:

#1064 - You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'mysql> CREATE DATABASE aliendatabase' at line 1



#2 Angus Gilmour

Angus Gilmour

    New Member

  • Members
  • Pip
  • 1 posts

Posted 10 August 2015 - 10:00 AM

Hi

 

The syntax error is on the following line:

 

`how_many VARCHAR (30) ,

 

Basically it is missing a closing ' after many.  Hope that helps.






0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users