Reputation: 30990
I need to echo a statement in stored procedure
DELIMITER $$ DROP PROCEDURE IF EXISTS `Edit_table` $$ CREATE PROCEDURE `Edit_table` (in_db_nm varchar(20),in_tbl_nm varchar(20),in_your_query varchar(200)) DETERMINISTIC BEGIN select concat('Table ',in_tbl_nm, ' not found'); END $$ DELIMITER ;
this is what I get from the console when running it, it seems to always print the first line because that's the table column name, is there a way to remove this?
concat('Table ',in_tbl_nm, ' not found') Table xxxxx not found
Upvotes: 0
Views: 785
Reputation: 44343
DELIMITER $$
DROP PROCEDURE IF EXISTS Edit_table
$$
CREATE PROCEDURE Edit_table
(in_db_nm varchar(20),in_tbl_nm
varchar(20),in_your_query varchar(200))
DETERMINISTIC
BEGIN
select concat('Table ',in_tbl_nm, ' not found') as DisplayData;
END $$
DELIMITER ;
This changes the header to 'DisplayData'
You can also start MySQL with --skip-column-names option to hide the column names
Upvotes: 0