Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- mysql -u root -p
- sprawdzenie jakie sa bazy
- show database;
- dodanie do aktywnych baz
- use nazwa;
- create table klient( imie varchar(35), nazwisko varchar(35), telefon decimak(10,0), email char(30), kID int not null Auto_Incerment, primary kay(kID));
- wyjscie z tabeli
- \c
- dodanie wartosci do tabeli
- insert into [nazwa]
- values([dane], [dane]);
- konkretna wartos
- insert into [nazwa] set [kolumna='wartosc'];
- wyswetlenie tabeli
- select *from [tabela];
- show tables;
- dodanie 1 kolumny
- alter table klient add wiek int;
- dodanie kilka kolumny
- alter table klient add (wysokosc int,
- koczu verchar(35) );
- dodanie kolumny w oktreslonej pozycji
- alter table klient add waga int alter wysokosc;
- modyfikacja istniejacej kolumny kolumn
- alter table klient modify koczu int;
- zmiana nazw kolumn
- alter table klient change wysokosc wzrost int;
- usuniecie kolumny
- alter table klient drop column wiek,
- drop column wzrost, drop column waga,
- drop column koczu;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement