Pomoc - Szukaj - Użytkownicy - Kalendarz
Pełna wersja: Tworzenie baz z pliku
Forum PHP.pl > Forum > Bazy danych
wojtekr
Witam, mam taki plik(dn.sql):
[sql:1:b469cd611e]
drop table if exists user;
create table user
( user_id int unsigned not null auto_increment primary key,
login char(10) not null,
imie char(30) not null,
nazwisko char(30) not null,
stanowisko char(30) not null,
plec char(1) not null,
stawkah float not null,
grupa char(10) not null
);

drop table if exists klient;
create table klient
( klient_id int unsigned not null auto_increment primary key,
nazwa_klient char (30) not null,
);

drop table if exists projekt;
create table projekt
( projekt_id int unsigned not null auto_increment primary key,
nazwa_proj char (30) not null,
opis_proj char (254),
status int not null,
);
[/sql:1:b469cd611e]
i przy próbie wprowadzenia:
Kod
mysql -u root -p -D dn < dn.sql


jest komunikat:

ERROR 1064 at line 13: You have an error in your SQL syntax near ')' at line 4
dzieki za pomoc
[/code]
Jabol
try this[sql:1:3cf7d3803c]
drop table if exists user;
create table user
( user_id int unsigned not null auto_increment primary key,
login char(10) not null,
imie char(30) not null,
nazwisko char(30) not null,
stanowisko char(30) not null,
plec char(1) not null,
stawkah float not null,
grupa char(10) not null
);

drop table if exists klient;
create table klient
( klient_id int unsigned not null auto_increment primary key,
nazwa_klient char (30) not null
);

drop table if exists projekt;
create table projekt
( projekt_id int unsigned not null auto_increment primary key,
nazwa_proj char (30) not null,
opis_proj char (254),
status int not null
);
[/sql:1:3cf7d3803c]
To jest wersja lo-fi głównej zawartości. Aby zobaczyć pełną wersję z większą zawartością, obrazkami i formatowaniem proszę kliknij tutaj.
Invision Power Board © 2001-2025 Invision Power Services, Inc.