Interactive Programming Forums
Login
Register
Home
Questions/Snippets/Exercises
Unanswered
Tags
Ask a Question
Post a Code Snippet
Post an Exercise
Welcome to Interactive Programming Forums, where you can ask questions, receive answers from other members of the community, post code snippets and post exercies.
All categories
Ruby
(3)
Python
(10)
PHP
(7)
Perl
(2)
SQL
(8)
Javascript
(6)
HTML
(20)
CSS
(4)
jQuery
(0)
XML
(3)
Code Snippets
(1)
Exercises
(4)
Other
(9)
error in sql exercise Chapter IV - CREATE TABLE 'Employees';
+7
votes
I am at SQL Chapter IV - exercise 3 (Create table) and could not pass even the exercise is correct;
I tried again the same exercise and AGAIN it gave me: "Exercise Result:
28% (4/14)Incorrect, check your code"
this how my prompt look in php:
========================
CREATE DATABASE 'mydatabase';
SHOW DATABASES;
CREATE TABLE 'Employees' (
ID INTEGER PRIMARY KEY AUTOINCREMENT,
firstname TEXT,
lastname TEXT,
position TEXT,
age INTEGER
);
=======================
Result:
mydatabase.db
=======================
Can anybody tell me how to continue this exercise? It look like the given exercise and my input is identical. What's wrong? Can be placed below exercise a "SKIP" button, "Sugested answers" or "Example" for learning purposes or such scenarios like above?
sql
error
programming-code
posted
12 years
ago
in
SQL
by
SUNRISER
(
2,050
points)
1 Answer
–2
votes
Please get rid of the single quotes around the database name and the table name.
CREATE DATABASE 'mydatabase'; -> CREATE DATABASE mydatabase;
CREATE TABLE 'Employees' (
ID INTEGER PRIMARY KEY AUTOINCREMENT,
firstname TEXT,
lastname TEXT,
position TEXT,
age INTEGER
);
to
CREATE TABLE Employees (
ID INTEGER PRIMARY KEY AUTOINCREMENT,
firstname TEXT,
lastname TEXT,
position TEXT,
age INTEGER
);
answered
12 years
ago
by
codeadmin
(
113,880
points)
Related questions
–1
vote
1
answer
error in sql exercise Chapter IV - DESCRIBE Employees;
posted
12 years
ago
in
SQL
by
SUNRISER
(
2,050
points)
sql
programming-code
error
0
votes
1
answer
Warning: array_combine() expects parameter 1 to be array, null given - = - and other error: Undefined variable: mixed
posted
12 years
ago
in
PHP
by
SUNRISER
(
2,050
points)
php
programming-code
error
+1
vote
1
answer
How to insert a record into 'employees' table?
posted
12 years
ago
in
SQL
by
yende
(
9,130
points)
+5
votes
1
answer
I completed SQL Exercise I like 10 times and it doesn't say I completed any...
posted
13 years
ago
in
SQL
by
leeand00
(
720
points)
+4
votes
1
answer
Python Code Error
posted
12 years
ago
in
Python
by
Manuel Pacheco
(
1,280
points)
python-programming-code
error