1.变量赋值方式
SELECT * FROM CONTACTS;
SET @EMAIL:='Jonas'
SELECT * FROM CONTACTS WHERE FIRST_NAME=@EMAIL;
SELECT @EMAIL:='Roland';
SELECT * FROM CONTACTS WHERE FIRST_NAME=@EMAIL;
SELECT @NUM_EMAIL:=COUNT(*) FROM CONTACTS;
SELECT @NUM_EMAIL NUM;
1.变量赋值方式
SELECT * FROM CONTACTS;
SET @EMAIL:='Jonas'
SELECT * FROM CONTACTS WHERE FIRST_NAME=@EMAIL;
SELECT @EMAIL:='Roland';
SELECT * FROM CONTACTS WHERE FIRST_NAME=@EMAIL;
SELECT @NUM_EMAIL:=COUNT(*) FROM CONTACTS;
SELECT @NUM_EMAIL NUM;