SQL Server 2008:
select UPPER(replace(sys.fn_varbintohexstr(hashbytes('SHA1', '12345')), '0x', ''));
select UPPER(replace(sys.fn_varbintohexstr(hashbytes('MD5', '12345')), '0x', ''));
MySQL:
SELECT md5('12345');
SELECT sha1('12345');
SQL Server 2008:
select UPPER(replace(sys.fn_varbintohexstr(hashbytes('SHA1', '12345')), '0x', ''));
select UPPER(replace(sys.fn_varbintohexstr(hashbytes('MD5', '12345')), '0x', ''));
MySQL:
SELECT md5('12345');
SELECT sha1('12345');