MySQL Forums
Forum List  »  MySQL Workbench

Re: Error Code: 1146 when creating new table desc
Posted by: J C
Date: June 26, 2022 02:30PM

Sounds good. Here is the text:

*****Query 1's Text*****

select * from `CIA_DATA`.`new_table`;



*****SQL File 3's Text*****

USE CIA_DATA;
DROP TABLE new_table;
CREATE TABLE new_table (
Water DECIMAL(3,1) NOT NULL,
Sanitation DECIMAL(3,1) NOT NULL,
GDP INT NOT NULL,
Life DECIMAL(3,1) NOT NULL,
Underweight DECIMAL(3,1) NOT NULL,
Literacy DECIMAL(3,1) NOT NULL,
Electricity DECIMAL(3,1) NOT NULL,
Country VARCHAR(45) NOT NULL,
PRIMARY KEY (GDP),
UNIQUE INDEX Country_UNIQUE (Country ASC) VISIBLE)
ENGINE = InnoDB

SELECT * FROM new_table;



*****SQL File 5's Text*****

desc CIA_DATA.new_table;

SELECT * FROM CIA_DATA.new_table;

INSERT INTO `CIA_DATA`.`new_table`
SELECT `Water`,
`Sanitation`,
`GDP`,
`Life`,
`Underweight`,
`Literacy`,
`Electricity`,
`Country`)
VALUES
(68.5,21.8,600,54.2,24.6,37.4,14,'Central_African_Republic');

COMMIT;

Options: ReplyQuote


Subject
Views
Written By
Posted
Re: Error Code: 1146 when creating new table desc
349
J C
June 26, 2022 02:30PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.