MySQL Forums
Forum List  »  Spanish

Asignacion de usuario
Posted by: Ruben Urquijo
Date: March 24, 2008 01:29PM

Hola, en un trigger quiero controlar que en mi tabla de usuario no haya ningun usuario conectado. Y si no hay usuarios, que el que cree el usuario, sea el root.
Pense en un script como este, pero no me funciona

select nombre_usuario into login from usuario where estado = 'Activo';
if login = null then
set login = current_user();
end if;

Alguien me podria dar una mano en esto? Desde ya, gracias

Options: ReplyQuote


Subject
Views
Written By
Posted
Asignacion de usuario
2237
March 24, 2008 01:29PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.