Hello everyone,
Here is code to create table named 'abcd'/
When I run this code a new abcd table is created containing one row.
When I try to create that table with 2 lines I run the following:
But here I recieve the following error message:
[pre]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 'UNION
SELECT 'bbbb'' at line 1[/pre]
Can anyone help me with that enigmatic error ?
Thanks
Here is code to create table named 'abcd'/
Code:
USE skullcrashingwords;
DROP TABLE IF EXISTS abcd;
CREATE TABLE abcd(
ID INT AUTO_INCREMENT,
Name VARCHAR(255) not null collate utf8_unicode_ci,
KEY (ID)
);
INSERT INTO abcd(name)
SELECT 'aaaaa';
When I try to create that table with 2 lines I run the following:
Code:
USE skullcrashingwords;
DROP TABLE IF EXISTS abcd;
CREATE TABLE abcd(
ID INT AUTO_INCREMENT,
Name VARCHAR(255) not null collate utf8_unicode_ci,
KEY (ID)
);
INSERT INTO abcd(name)
SELECT 'aaaaa';
UNION
SELECT 'bbbb';
[pre]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 'UNION
SELECT 'bbbb'' at line 1[/pre]
Can anyone help me with that enigmatic error ?
Thanks