SQLize Online / PHPize Online  /  SQLtest Online

A A A
Share      Blog   Popular
Copy Format Clear
CREATE SCHEMA topic_2; CREATE TABLE IF NOT EXISTS topic_2.salary( employees_nm varchar(100), department_nm varchar(100), salary int ); -- SELECT table_name from information_schema.tables INSERT INTO topic_2.salary VALUES('Ken Sánchez', 'HR', 78); INSERT INTO topic_2.salary VALUES('TerriLee Duffy', 'HR', 95); INSERT INTO topic_2.salary VALUES('Roberto Tamburello', 'HR', 382); INSERT INTO topic_2.salary VALUES('Rob Walters', 'HR', 16); INSERT INTO topic_2.salary VALUES('Gail Erickson', 'HR', 1079); INSERT INTO topic_2.salary VALUES('Jossef Gibson', 'HR', 102); INSERT INTO topic_2.salary VALUES('Dylan Miller', 'HR', 486); INSERT INTO topic_2.salary VALUES('Diane Margheim', 'HR', 1953); INSERT INTO topic_2.salary VALUES('Gigi Matthew', 'SALE', 49); INSERT INTO topic_2.salary VALUES('Michael Raheem', 'SALE', 71); INSERT INTO topic_2.salary VALUES('Ovidiu Cracium', 'SALE', 94); INSERT INTO topic_2.salary VALUES('Thierry Hers', 'SALE', 61); INSERT INTO topic_2.salary VALUES('Janice Galvin', 'SALE', 972); INSERT INTO topic_2.salary VALUES('Michael Sullivan', 'SALE', 849); INSERT INTO topic_2.salary VALUES('Sharon Salavaria', 'SALE', 715); INSERT INTO topic_2.salary VALUES('David Michael', 'SALE', 94); INSERT INTO topic_2.salary VALUES('Kevin Brown', 'R&D', 891); INSERT INTO topic_2.salary VALUES('John Wood', 'R&D', 1486); INSERT INTO topic_2.salary VALUES('Mary Dempsey', 'R&D', 176); INSERT INTO topic_2.salary VALUES('Wanida Benshoof', 'R&D', 49); INSERT INTO topic_2.salary VALUES('Terry Eminhizer', 'R&D', 381); INSERT INTO topic_2.salary VALUES('Sariya Harnpadoungsataya', 'R&D', 946); INSERT INTO topic_2.salary VALUES('Mary Gibson', 'R&D', 486); INSERT INTO topic_2.salary VALUES('Jill Williams', 'R&D', 19); INSERT INTO topic_2.salary VALUES('James Hamilton', 'R&D', 46); INSERT INTO topic_2.salary VALUES('Peter Krebs', 'R&D', 445); INSERT INTO topic_2.salary VALUES('Jo Brown', 'R&D', 666) ; INSERT INTO topic_2.salary VALUES('Guy Gilbert', 'MANAGEMENT', 482); INSERT INTO topic_2.salary VALUES('Mark McArthur', 'MANAGEMENT', 12); INSERT INTO topic_2.salary VALUES('Britta Simon', 'MANAGEMENT', 194); INSERT INTO topic_2.salary VALUES('Margie Shoop', 'MANAGEMENT', 481); INSERT INTO topic_2.salary VALUES('Rebecca Laszlo', 'MANAGEMENT', 16); INSERT INTO topic_2.salary VALUES('Annik Stahl', 'MANAGEMENT', 134); INSERT INTO topic_2.salary VALUES('Suchitra Mohan', 'R&D', 87); INSERT INTO topic_2.salary VALUES('Brandon Heidepriem', 'R&D', 111) ; INSERT INTO topic_2.salary VALUES('Jose Lugo', 'R&D', 185); INSERT INTO topic_2.salary VALUES('Chris Okelberry', 'R&D', 94); INSERT INTO topic_2.salary VALUES('Kim Abercrombie', 'R&D', 348); INSERT INTO topic_2.salary VALUES('Ed Dudenhoefer', 'R&D', 68); INSERT INTO topic_2.salary VALUES('JoLynn Dobney', 'R&D', 346); INSERT INTO topic_2.salary VALUES('Bryan Baker', 'R&D', 185); INSERT INTO topic_2.salary VALUES('James Kramer', 'SUPPORT', 965); INSERT INTO topic_2.salary VALUES('Nancy Anderson', 'SUPPORT', 444); INSERT INTO topic_2.salary VALUES('Simon Rapier', 'SUPPORT', 133); INSERT INTO topic_2.salary VALUES('Thomas Michaels', 'SUPPORT', 200); INSERT INTO topic_2.salary VALUES('Eugene Kogan', 'SUPPORT', 144); INSERT INTO topic_2.salary VALUES('Andrew Hill', 'SUPPORT', 186); INSERT INTO topic_2.salary VALUES('Ruth Ellerbrock', 'SUPPORT', 179); INSERT INTO topic_2.salary VALUES('Barry Johnson', 'HEAD', 10000); INSERT INTO topic_2.salary VALUES('Sidney Higa', 'HEAD', 1); INSERT INTO topic_2.salary VALUES('Max Lanson', 'PR', 150); SELECT employees_nm FROM topic_2.salary WHERE salary BETWEEN 300 and 500;

Stuck with a problem? Got Error? Ask ChatGPT!

Copy Clear