Quantcast
Viewing all articles
Browse latest Browse all 3724

SELECT without Result Set Tab? (1 reply)

Hi everyone,

I could use an assist with something.

I am building a table with two fields, ID and MatchID. The first is an autoincrementing ID and the second an integer column that will hold a random integer between 1 and 86,000. I will generate about 2,000 of these rows.

My insert code runs like this:

SET @randint= CAST(RAND()*86000 as signed);
SELECT @varexists:=COUNT(*) from ids where matchid = @randint;
IF @varexists = 0 then
INSERT INTO ids (matchid) values (@randint);
set @count = @count + 1;
END IF;

I am running this in MySQL workbench. Every time the SELECT runs, MySQL Workbech generates a result set tab for it. I would like to avoid that as it is unnecessary. Is there a way for me to do that?

Thanks

Viewing all articles
Browse latest Browse all 3724

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>