mysql> select @id:=stid from c where stid='1';
+-----------+
| @id:=stid |
+-----------+
| 1 |
+-----------+
1 row in set (0.04 sec)
----------------------------------------------
mysql> delete from s where id=@id;
Query OK, 1 row affected (0.08 sec)
mysql> select * from s;
...