1. Zalogować się na serwer MySQL cd c:\xampp\mysql\bin i ENTER xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx 2. Wpisać wykorzystująć klawaiturę: mysql -h localhost -u root -p i ENTER Podaj hasło => zakceptować tylko ENTEREM 2. Utworzyć i pokazać założoną bazę - podaj_nazwisko CREATE DATABASE podaj_swoje_nazwisko; USE podaj_swoje_nazwisko; xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx 3.Utworzyć tabelę podaj_nazwisko1 CREATE TABLE KOWALSKI( id int(3) AUTO_INCREMENT PRIMARY KEY, imie varchar(30), nazwisko varchar(30), miejscowosc varchar(30), telefon varchar(20), email varchar(20) ) ENGINE=InnoDB DEFAULT CHARSET=latin2; xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx 4. Pokaż założoną tabelę DESCRIBE podaj_nazwisko1; xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx 5. WSTAWIĆ REKORDY DO UTWORZONEJ TABELI - Skopiować i wkleić do KONSOLI: INSERT INTO SZUPER5(id,imie,nazwisko,miejscowosc,telefon,email) VALUES('','Piotr', 'Kowalski', 'Warszawa', '075 145 345 344', 'wymyslony1@gmail.com'), ('','Andrzej', 'Romaniuk', 'Wrocław', '075 144 335 333', 'wymyslony2@gmail.com'),('','Piotr', 'Kamiński', 'Poznań', '075 255 355 444', 'wymyslony3@gmail.com'); xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx 6. Pokazać zawartość tabeli po wstawieniu rekordów SELECT * FROM modyfikacja1; xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx 7. WSTAWIĆ DRUGSĄ TABELĘ CREATE TABLE KOWALSKI2( id int PRIMARY KEY AUTO_INCREMENT NOT NULL, nazwisko varchar(40) NOT NULL, imie varchar(40) NOT NULL, etat varchar(20) NOT NULL, dzial int NOT NULL, pracuje_od date NOT NULL, placa_podst int NOT NULL, placa_dodat int NOT NULL, premia int NOT NULL) ENGINE=InnoDB DEFAULT CHARSET=latin2; xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx 8. WSTAWIĆ REKORDY DO UTWORZONEJ TABELI - Skopiować i wkleić do KONSOLI: INSERT INTO (id, nazwisko,imie, etat, dzial, pracuje_od, placa_podst, placa_dodat, premia) VALUES ('','Kowalski', 'Jan', 'dyrektor', 20, '1987-03-12',4000, 1200,400), ('','Dalicka','Janina','sekretarka', 40, '2012-05-15',2500, 0,150 ), ('','Rajski','Tomasz', 'dyrektor', 20, '2014-04-21',4000, 1000,350 ), ('','Madeja','Adrian', 'asystent', 30, '2005-08-18',3000, 800,150 ), ('','Dajcz','Lech', 'laborant', 50, '2015-06-28',2500, 100,100 ), ('','Warski','Kamil','dyrektor', 20, '2012-04-19',4000, 900,200 ), ('','Paluszkiewicz', 'Stanisław', 'profesor', 10, '2008-04-15',5000, 1200,400 ), ('','Szpak', 'Alelsander', 'laborant', 50, '2015-08-18',2500, 400,100 ), ('','Milkski','Adam', 'asystent', 30, '2013-04-25',3000, 500, 180 ), ('','Garbarski', 'Michał', 'stażysta', 60, '2018-10-19',2100, 300,180 ), ('','Rusnak', 'Anna', 'dyrektor', 20, '2012-05-22', 4000, 400, 300 ), ('','Kolski', 'Sebastian', 'stażysta', 60, '2017-01-22',2500, 300, 180 ); xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx 9. Pokazać zawartość tabeli po wstawieniu rekordów SELECT * FROM modyfikacja1; xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx Setting environment for using XAMPP for Windows. sala207@S207-01 c:\xampp # mysql -h localhost -u root -p Enter password: Welcome to the MariaDB monitor. Commands end with ; or \g. Your MariaDB connection id is 5 Server version: 10.1.19-MariaDB mariadb.org binary distribution Copyright (c) 2000, 2016, Oracle, MariaDB Corporation Ab and others. Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. MariaDB [(none)]> CREATE DATABASE SZUPER; ERROR 1007 (HY000): Can't create database 'szuper'; database exists MariaDB [(none)]> CREATE DATABASE SZUPER5; Query OK, 1 row affected (0.00 sec) MariaDB [(none)]> USE SZUPER5; Database changed MariaDB [SZUPER5]> CREATE TABLE SZUPER5( -> id int(3) AUTO_INCREMENT PRIMARY KEY, -> imie varchar(30), -> nazwisko varchar(30), -> miejscowosc varchar(30), -> telefon varchar(20), -> email varchar(20) -> ) ENGINE=InnoDB DEFAULT CHARSET=latin2; Query OK, 0 rows affected (0.01 sec) MariaDB [SZUPER5]> SELECT * FROM SZUPER5; Empty set (0.00 sec) MariaDB [SZUPER5]> SHOW TABLES ; +-------------------+ | Tables_in_szuper5 | +-------------------+ | szuper5 | +-------------------+ 1 row in set (0.00 sec) MariaDB [SZUPER5]> INSERT INTO SZUPER5(id,imie,nazwisko,miejscowosc,telefon,email) -> VALUES('','Piotr', 'Kowalski', 'Warszawa', '075 145 345 344', 'wymyslony1@gmail.com'), -> ('','Andrzej', 'Romaniuk', 'Wrocław', '075 144 335 333', 'wymyslony2@gmail.com'),('','Piotr', 'Kamiński', 'Poznań', '075 255 355 444', 'wymyslony3@gmail.com'); Query OK, 3 rows affected, 3 warnings (0.01 sec) Records: 3 Duplicates: 0 Warnings: 3 MariaDB [SZUPER5]> MariaDB [SZUPER5]> SHOW TABLES ; +-------------------+ | Tables_in_szuper5 | +-------------------+ | szuper5 | +-------------------+ 1 row in set (0.00 sec) MariaDB [SZUPER5]> SELECT * FROM SZUPER5; +----+---------+----------+-------------+-----------------+----------------------+ | id | imie | nazwisko | miejscowosc | telefon | email | +----+---------+----------+-------------+-----------------+----------------------+ | 1 | Piotr | Kowalski | Warszawa | 075 145 345 344 | wymyslony1@gmail.com | | 2 | Andrzej | Romaniuk | Wrocław | 075 144 335 333 | wymyslony2@gmail.com | | 3 | Piotr | Kamiński | Poznań | 075 255 355 444 | wymyslony3@gmail.com | +----+---------+----------+-------------+-----------------+----------------------+ 3 rows in set (0.00 sec) MariaDB [SZUPER5]> SELECT imie,nazwisko FROM SZUPER5; +---------+----------+ | imie | nazwisko | +---------+----------+ | Piotr | Kowalski | | Andrzej | Romaniuk | | Piotr | Kamiński | +---------+----------+ 3 rows in set (0.00 sec) MariaDB [SZUPER5]> CREATE TABLE SZUPER6 ( -> id int PRIMARY KEY AUTO_INCREMENT NOT NULL, -> nazwisko varchar(40) NOT NULL, -> imie varchar(40) NOT NULL, -> etat varchar(20) NOT NULL, -> dzial int NOT NULL, -> pracuje_od date NOT NULL, -> placa_podst int NOT NULL, -> placa_dodat int NOT NULL, -> premia int NOT NULL) ENGINE=InnoDB DEFAULT CHARSET=latin2; Query OK, 0 rows affected (0.01 sec) MariaDB [SZUPER5]> INSERT INTO SZUPER6 (id, nazwisko,imie, etat, dzial, pracuje_od, placa_podst, placa_dodat, premia) -> VALUES ('','Kowalski', 'Jan', 'dyrektor', 20, '1987-03-12',4000, 1200,400), -> ('','Dalicka','Janina','sekretarka', 40, '2012-05-15',2500, 0,150 ), -> ('','Rajski','Tomasz', 'dyrektor', 20, '2014-04-21',4000, 1000,350 ), -> ('','Madeja','Adrian', 'asystent', 30, '2005-08-18',3000, 800,150 ), -> ('','Dajcz','Lech', 'laborant', 50, '2015-06-28',2500, 100,100 ), -> ('','Warski','Kamil','dyrektor', 20, '2012-04-19',4000, 900,200 ), -> ('','Paluszkiewicz', 'Stanisław', 'profesor', 10, '2008-04-15',5000, 1200,400 ), -> ('','Szpak', 'Alelsander', 'laborant', 50, '2015-08-18',2500, 400,100 ), -> ('','Milkski','Adam', 'asystent', 30, '2013-04-25',3000, 500, 180 ), -> ('','Garbarski', 'Michał', 'stażysta', 60, '2018-10-19',2100, 300,180 ), -> ('','Rusnak', 'Anna', 'dyrektor', 20, '2012-05-22', 4000, 400, 300 ), -> ('','Kolski', 'Sebastian', 'stażysta', 60, '2017-01-22',2500, 300, 180 ); Query OK, 12 rows affected, 12 warnings (0.00 sec) Records: 12 Duplicates: 0 Warnings: 12 MariaDB [SZUPER5]> SELECT *FROM SZUPER6; +----+---------------+------------+------------+-------+------------+-------------+-------------+--------+ | id | nazwisko | imie | etat | dzial | pracuje_od | placa_podst | placa_dodat | premia | +----+---------------+------------+------------+-------+------------+-------------+-------------+--------+ | 1 | Kowalski | Jan | dyrektor | 20 | 1987-03-12 | 4000 | 1200 | 400 | | 2 | Dalicka | Janina | sekretarka | 40 | 2012-05-15 | 2500 | 0 | 150 | | 3 | Rajski | Tomasz | dyrektor | 20 | 2014-04-21 | 4000 | 1000 | 350 | | 4 | Madeja | Adrian | asystent | 30 | 2005-08-18 | 3000 | 800 | 150 | | 5 | Dajcz | Lech | laborant | 50 | 2015-06-28 | 2500 | 100 | 100 | | 6 | Warski | Kamil | dyrektor | 20 | 2012-04-19 | 4000 | 900 | 200 | | 7 | Paluszkiewicz | Stanisław | profesor | 10 | 2008-04-15 | 5000 | 1200 | 400 | | 8 | Szpak | Alelsander | laborant | 50 | 2015-08-18 | 2500 | 400 | 100 | | 9 | Milkski | Adam | asystent | 30 | 2013-04-25 | 3000 | 500 | 180 | | 10 | Garbarski | Michał | stażysta | 60 | 2018-10-19 | 2100 | 300 | 180 | | 11 | Rusnak | Anna | dyrektor | 20 | 2012-05-22 | 4000 | 400 | 300 | | 12 | Kolski | Sebastian | stażysta | 60 | 2017-01-22 | 2500 | 300 | 180 | +----+---------------+------------+------------+-------+------------+-------------+-------------+--------+ 12 rows in set (0.00 sec) MariaDB [SZUPER5]> SELECT imie,etat,dzial FROM SZUPER6; +------------+------------+-------+ | imie | etat | dzial | +------------+------------+-------+ | Jan | dyrektor | 20 | | Janina | sekretarka | 40 | | Tomasz | dyrektor | 20 | | Adrian | asystent | 30 | | Lech | laborant | 50 | | Kamil | dyrektor | 20 | | Stanisław | profesor | 10 | | Alelsander | laborant | 50 | | Adam | asystent | 30 | | Michał | stażysta | 60 | | Anna | dyrektor | 20 | | Sebastian | stażysta | 60 | +------------+------------+-------+ 12 rows in set (0.00 sec) MariaDB [SZUPER5]> DESCRIPE SZUPER5; ERROR 1064 (42000): 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 'DESCRIPE SZUPER5' at line 1 MariaDB [SZUPER5]> DESCRIBE SZUPER5; +-------------+-------------+------+-----+---------+----------------+ | Field | Type | Null | Key | Default | Extra | +-------------+-------------+------+-----+---------+----------------+ | id | int(3) | NO | PRI | NULL | auto_increment | | imie | varchar(30) | YES | | NULL | | | nazwisko | varchar(30) | YES | | NULL | | | miejscowosc | varchar(30) | YES | | NULL | | | telefon | varchar(20) | YES | | NULL | | | email | varchar(20) | YES | | NULL | | +-------------+-------------+------+-----+---------+----------------+ 6 rows in set (0.00 sec) MariaDB [SZUPER5]> DESCRIBE SZUPER6; +-------------+-------------+------+-----+---------+----------------+ | Field | Type | Null | Key | Default | Extra | +-------------+-------------+------+-----+---------+----------------+ | id | int(11) | NO | PRI | NULL | auto_increment | | nazwisko | varchar(40) | NO | | NULL | | | imie | varchar(40) | NO | | NULL | | | etat | varchar(20) | NO | | NULL | | | dzial | int(11) | NO | | NULL | | | pracuje_od | date | NO | | NULL | | | placa_podst | int(11) | NO | | NULL | | | placa_dodat | int(11) | NO | | NULL | | | premia | int(11) | NO | | NULL | | +-------------+-------------+------+-----+---------+----------------+ 9 rows in set (0.00 sec) MariaDB [SZUPER5]> CREATE TABLE SZUPER7 AS (SELECT * FROM SZUPER6 WHERE 1 = 0); Query OK, 0 rows affected (0.01 sec) Records: 0 Duplicates: 0 Warnings: 0 MariaDB [SZUPER5]> SHOW TABLES ; +-------------------+ | Tables_in_szuper5 | +-------------------+ | szuper5 | | szuper6 | | szuper7 | +-------------------+ 3 rows in set (0.00 sec) MariaDB [SZUPER5]> SHOW TABLE SZUPER7; ERROR 1064 (42000): 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 'SZUPER7' at line 1 MariaDB [SZUPER5]> SELECT *FROM SZUPER7; Empty set (0.00 sec) MariaDB [SZUPER5]> DESCRIBE SZUPER7; +-------------+-------------+------+-----+---------+-------+ | Field | Type | Null | Key | Default | Extra | +-------------+-------------+------+-----+---------+-------+ | id | int(11) | NO | | 0 | | | nazwisko | varchar(40) | NO | | NULL | | | imie | varchar(40) | NO | | NULL | | | etat | varchar(20) | NO | | NULL | | | dzial | int(11) | NO | | NULL | | | pracuje_od | date | NO | | NULL | | | placa_podst | int(11) | NO | | NULL | | | placa_dodat | int(11) | NO | | NULL | | | premia | int(11) | NO | | NULL | | +-------------+-------------+------+-----+---------+-------+ 9 rows in set (0.00 sec) MariaDB [SZUPER5]> SELECT *FROM SZUPER; ERROR 1146 (42S02): Table 'szuper5.szuper' doesn't exist MariaDB [SZUPER5]> SELECT *FROM SZUPER2; ERROR 1146 (42S02): Table 'szuper5.szuper2' doesn't exist MariaDB [SZUPER5]> SELECT *FROM SZUPER5; +----+---------+----------+-------------+-----------------+----------------------+ | id | imie | nazwisko | miejscowosc | telefon | email | +----+---------+----------+-------------+-----------------+----------------------+ | 1 | Piotr | Kowalski | Warszawa | 075 145 345 344 | wymyslony1@gmail.com | | 2 | Andrzej | Romaniuk | Wrocław | 075 144 335 333 | wymyslony2@gmail.com | | 3 | Piotr | Kamiński | Poznań | 075 255 355 444 | wymyslony3@gmail.com | +----+---------+----------+-------------+-----------------+----------------------+ 3 rows in set (0.00 sec) MariaDB [SZUPER5]> INSERT INTO SZUPER6; ERROR 1064 (42000): 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 '' at line 1 MariaDB [SZUPER5]> INSERT IN TO SZUPER6; ERROR 1064 (42000): 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 'IN TO SZUPER6' at line 1 MariaDB [SZUPER5]> INSERT INTO SZUPER6 (id, imie); ERROR 1064 (42000): 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 '' at line 1 MariaDB [SZUPER5]> INSERT INTO SZUPER6 -> (id,imie,nazwisko,miejscowosc,telefon) -> VALUES -> ('','JAN','KOWALSKI','JELENIA GORA', '123456789'); ERROR 1054 (42S22): Unknown column 'miejscowosc' in 'field list' MariaDB [SZUPER5]> INSERT INTO SZUPER5 -> (id,imie,nazwisko,miejscowosc,telefon) -> VALUES -> (id,imie,nazwisko,miejscowosc,telefon) -> ` `> ; `> Bye sala207@S207-01 c:\xampp # mysql -h localhost -u root -p Enter password: * ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES) sala207@S207-01 c:\xampp # mysql -h localhost -u root -p Enter password: Welcome to the MariaDB monitor. Commands end with ; or \g. Your MariaDB connection id is 7 Server version: 10.1.19-MariaDB mariadb.org binary distribution Copyright (c) 2000, 2016, Oracle, MariaDB Corporation Ab and others. Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. MariaDB [(none)]> INSERT INTO SZUPER5 -> (id,imie,nazwisko,miejscowosc,telefon) -> VALUES -> (id,imie,nazwisko,miejscowosc,telefon) -> ; ERROR 1046 (3D000): No database selected MariaDB [(none)]> USE SZUPER5; Database changed MariaDB [SZUPER5]> INSERT INTO SZUPER5 -> (id,imie,nazwisko,miejscowosc,telefon) -> VALUES -> ('','JAN','KOWALSKI','JELENIA GORA', '123456789'); Query OK, 1 row affected, 1 warning (0.00 sec) MariaDB [SZUPER5]> SELECT * from SZUPER5; +----+---------+----------+--------------+-----------------+----------------------+ | id | imie | nazwisko | miejscowosc | telefon | email | +----+---------+----------+--------------+-----------------+----------------------+ | 1 | Piotr | Kowalski | Warszawa | 075 145 345 344 | wymyslony1@gmail.com | | 2 | Andrzej | Romaniuk | Wrocław | 075 144 335 333 | wymyslony2@gmail.com | | 3 | Piotr | Kamiński | Poznań | 075 255 355 444 | wymyslony3@gmail.com | | 4 | JAN | KOWALSKI | JELENIA GORA | 123456789 | NULL | +----+---------+----------+--------------+-----------------+----------------------+ 4 rows in set (0.00 sec) MariaDB [SZUPER5]> SELECT INTO SZUPER5 SET id='2', imie='Jan', nazwisko = 'Skiba', telefon='123456789',miejscowosc='Karpacz'; ERROR 1064 (42000): 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 'INTO SZUPER5 SET id='2', imie='Jan', nazwisko = 'Skiba', telefon='123456789',mie' at line 1 MariaDB [SZUPER5]> SELECT INTO SZUPER5 SET id='2', imie='Jan', nazwisko = 'Trzydziesci', telefon='123456789',miejscowosc='Karpacz'; ERROR 1064 (42000): 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 'INTO SZUPER5 SET id='2', imie='Jan', nazwisko = 'Trzydziesci', telefon='12345678' at line 1 MariaDB [SZUPER5]> SELECT INTO SZUPER5 SET id='2', imie='Jan', nazwisko = 'Trzydziesci', telefon='123456789',miejscowosc='Karpacz'; ERROR 1064 (42000): 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 'INTO SZUPER5 SET id='2', imie='Jan', nazwisko = 'Trzydziesci', telefon='12345678' at line 1 MariaDB [SZUPER5]> INSERT INTO SZUPER5 SET id='2', imie='Jan', nazwisko = 'Trzydziesci', telefon='123456789',miejscowosc='Karpacz'; ERROR 1062 (23000): Duplicate entry '2' for key 'PRIMARY' MariaDB [SZUPER5]> SELECT INTO SZUPER5 SET id='12', imie='Jan', nazwisko = 'Skiba', telefon='123456789',miejscowosc='Karpacz'; ERROR 1064 (42000): 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 'INTO SZUPER5 SET id='12', imie='Jan', nazwisko = 'Skiba', telefon='123456789',mi' at line 1 MariaDB [SZUPER5]> SELECT INTO SZUPER5 SET id='12', imie='Jan', nazwisko = 'Skiba', telefon='123456789',miejscowosc='Karpacz'; ERROR 1064 (42000): 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 'INTO SZUPER5 SET id='12', imie='Jan', nazwisko = 'Skiba', telefon='123456789',mi' at line 1 MariaDB [SZUPER5]> INSERT INTO SZUPER5 SET id='2', imie='Jan', nazwisko = 'Trzydziesci', telefon='123456789',miejscowosc='Karpacz'; ERROR 1062 (23000): Duplicate entry '2' for key 'PRIMARY' MariaDB [SZUPER5]> INSERT INTO SZUPER5 SET id='12', imie='Jan', nazwisko = 'Trzydziesci', telefon='123456789',miejscowosc='Karpacz'; Query OK, 1 row affected (0.00 sec) MariaDB [SZUPER5]> SELECT * from SZUPER5; +----+---------+-------------+--------------+-----------------+----------------------+ | id | imie | nazwisko | miejscowosc | telefon | email | +----+---------+-------------+--------------+-----------------+----------------------+ | 1 | Piotr | Kowalski | Warszawa | 075 145 345 344 | wymyslony1@gmail.com | | 2 | Andrzej | Romaniuk | Wrocław | 075 144 335 333 | wymyslony2@gmail.com | | 3 | Piotr | Kamiński | Poznań | 075 255 355 444 | wymyslony3@gmail.com | | 4 | JAN | KOWALSKI | JELENIA GORA | 123456789 | NULL | | 12 | Jan | Trzydziesci | Karpacz | 123456789 | NULL | +----+---------+-------------+--------------+-----------------+----------------------+ 5 rows in set (0.00 sec) MariaDB [SZUPER5]> INSERT INTO SZUPER5 (NAZWA,DATA) VALUES (MAREK, DZISIAJ),(10,20); ERROR 1054 (42S22): Unknown column 'MAREK' in 'field list' MariaDB [SZUPER5]> INSERT INTO SZUPER5 (NAZWA,DATA) VALUES (nazwisko, telefon),(10,20); ERROR 1054 (42S22): Unknown column 'NAZWA' in 'field list' MariaDB [SZUPER5]> INSERT INTO SZUPER5 (telefon,email) VALUES (nazwisko, telefon),(10,20); Query OK, 2 rows affected (0.00 sec) Records: 2 Duplicates: 0 Warnings: 0 MariaDB [SZUPER5]> SELECT * from SZUPER5; +----+---------+-------------+--------------+-----------------+----------------------+ | id | imie | nazwisko | miejscowosc | telefon | email | +----+---------+-------------+--------------+-----------------+----------------------+ | 1 | Piotr | Kowalski | Warszawa | 075 145 345 344 | wymyslony1@gmail.com | | 2 | Andrzej | Romaniuk | Wrocław | 075 144 335 333 | wymyslony2@gmail.com | | 3 | Piotr | Kamiński | Poznań | 075 255 355 444 | wymyslony3@gmail.com | | 4 | JAN | KOWALSKI | JELENIA GORA | 123456789 | NULL | | 12 | Jan | Trzydziesci | Karpacz | 123456789 | NULL | | 13 | NULL | NULL | NULL | NULL | NULL | | 14 | NULL | NULL | NULL | 10 | 20 | +----+---------+-------------+--------------+-----------------+----------------------+ 7 rows in set (0.00 sec) MariaDB [SZUPER5]> INSERT INTO SZUPER5 (miejscowosc,telefon) VALUES (nazwisko, telefon),(10,20); Query OK, 2 rows affected (0.00 sec) Records: 2 Duplicates: 0 Warnings: 0 MariaDB [SZUPER5]> SELECT * from SZUPER5; +----+---------+-------------+--------------+-----------------+----------------------+ | id | imie | nazwisko | miejscowosc | telefon | email | +----+---------+-------------+--------------+-----------------+----------------------+ | 1 | Piotr | Kowalski | Warszawa | 075 145 345 344 | wymyslony1@gmail.com | | 2 | Andrzej | Romaniuk | Wrocław | 075 144 335 333 | wymyslony2@gmail.com | | 3 | Piotr | Kamiński | Poznań | 075 255 355 444 | wymyslony3@gmail.com | | 4 | JAN | KOWALSKI | JELENIA GORA | 123456789 | NULL | | 12 | Jan | Trzydziesci | Karpacz | 123456789 | NULL | | 13 | NULL | NULL | NULL | NULL | NULL | | 14 | NULL | NULL | NULL | 10 | 20 | | 15 | NULL | NULL | NULL | NULL | NULL | | 16 | NULL | NULL | 10 | 20 | NULL | +----+---------+-------------+--------------+-----------------+----------------------+ 9 rows in set (0.00 sec) MariaDB [SZUPER5]> INSERT INTO SZUPER5 (telefon,email) VALUES (karpacz, 123456789),(krakow,123456720); ERROR 1054 (42S22): Unknown column 'karpacz' in 'field list' MariaDB [SZUPER5]> SELECT * from SZUPER5; +----+---------+-------------+--------------+-----------------+----------------------+ | id | imie | nazwisko | miejscowosc | telefon | email | +----+---------+-------------+--------------+-----------------+----------------------+ | 1 | Piotr | Kowalski | Warszawa | 075 145 345 344 | wymyslony1@gmail.com | | 2 | Andrzej | Romaniuk | Wrocław | 075 144 335 333 | wymyslony2@gmail.com | | 3 | Piotr | Kamiński | Poznań | 075 255 355 444 | wymyslony3@gmail.com | | 4 | JAN | KOWALSKI | JELENIA GORA | 123456789 | NULL | | 12 | Jan | Trzydziesci | Karpacz | 123456789 | NULL | | 13 | NULL | NULL | NULL | NULL | NULL | | 14 | NULL | NULL | NULL | 10 | 20 | | 15 | NULL | NULL | NULL | NULL | NULL | | 16 | NULL | NULL | 10 | 20 | NULL | +----+---------+-------------+--------------+-----------------+----------------------+ 9 rows in set (0.00 sec) MariaDB [SZUPER5]> INSERT INTO SZUPER5 (miejscowosc,telefon) VALUES (karpacz, 123456789),(karpacz,123456720); ERROR 1054 (42S22): Unknown column 'karpacz' in 'field list' MariaDB [SZUPER5]> INSERT INTO SZUPER5 (miejscowosc,telefon) VALUES (karpacz, 123456789),(karpacz,123456720); ERROR 1054 (42S22): Unknown column 'karpacz' in 'field list' MariaDB [SZUPER5]> INSERT INTO SZUPER5 (miejscowosc,telefon) VALUES ('karpacz', 123456789),('karpacz',123456720); Query OK, 2 rows affected (0.00 sec) Records: 2 Duplicates: 0 Warnings: 0 MariaDB [SZUPER5]> SELECT * from SZUPER5; +----+---------+-------------+--------------+-----------------+----------------------+ | id | imie | nazwisko | miejscowosc | telefon | email | +----+---------+-------------+--------------+-----------------+----------------------+ | 1 | Piotr | Kowalski | Warszawa | 075 145 345 344 | wymyslony1@gmail.com | | 2 | Andrzej | Romaniuk | Wrocław | 075 144 335 333 | wymyslony2@gmail.com | | 3 | Piotr | Kamiński | Poznań | 075 255 355 444 | wymyslony3@gmail.com | | 4 | JAN | KOWALSKI | JELENIA GORA | 123456789 | NULL | | 12 | Jan | Trzydziesci | Karpacz | 123456789 | NULL | | 13 | NULL | NULL | NULL | NULL | NULL | | 14 | NULL | NULL | NULL | 10 | 20 | | 15 | NULL | NULL | NULL | NULL | NULL | | 16 | NULL | NULL | 10 | 20 | NULL | | 17 | NULL | NULL | karpacz | 123456789 | NULL | | 18 | NULL | NULL | karpacz | 123456720 | NULL | +----+---------+-------------+--------------+-----------------+----------------------+ 11 rows in set (0.00 sec) MariaDB [SZUPER5]>