SQLize Online / PHPize Online  /  SQLtest Online

A A A
Share      Blog   Popular
Copy Format Clear
-- Вендорсы DROP TABLE IF EXISTS Vendors; CREATE TABLE Vendors ( vend_id VARCHAR(5) PRIMARY KEY NOT NULL, vend_name VARCHAR(50) NOT NULL, vend_address VARCHAR(50) DEFAULT NULL, vend_city VARCHAR(50) DEFAULT NULL, vend_state VARCHAR(5) DEFAULT NULL, vend_zip VARCHAR(10) DEFAULT NULL, vend_country VARCHAR(50) DEFAULT NULL ); INSERT INTO Vendors VALUES ('BRE02', 'Bear Emporium', '500 Park Street', 'Anytown', 'OH', '44333', 'USA'), ('BRS01', 'Bears R Us', '123 Main Street', 'Bear town', 'MI', '44444', 'USA'), ('DLL01', 'Doll House Inc.', '555 High Street', 'Dollsville', 'CA', '99999', 'USA'), ('FNG01', 'Fun and Games', '42 Galaxy Road', 'London', NULL, 'N16 6PS', 'USA'), ('FRB01', 'Furball Inc.', '1000 5th Avenue', 'New York', 'NY', '11111', 'England'), ('JT01', 'Jouets et ours', '1 Rue Amusement', 'Paris', NULL, '45678', 'France'); SELECT RTRIM(CONCAT(vend_country, vend_zip)) AS trimmed_concatenated_result FROM Vendors ORDER BY vend_country;

Stuck with a problem? Got Error? Ask ChatGPT!

Copy Clear