On 2006.04.06, Mark Aufflick <[EMAIL PROTECTED]> wrote: > That's great - I'm a bit of a Sybase newby and this tip makes life a > lot easier. > > Given that this is so easy and reasonable I don't understand why so > many Sybase developers employ other unreliable methods to emulate > triggers.
For the exact same reason you almost did: new developers don't know any better, but most of them don't bother to ask anyone. Instead, they go ahead and implement some crazy brokenness because they have to "just make it work" ... I find most crap code ends up written this way. On 2006.04.06, Mark Aufflick <[EMAIL PROTECTED]> wrote: > > > Most of the web world runs on MySQL and does ok - just like CDBaby who > > You can't possibly liken Sybase to MySQL! > > I know that they are not even in the same league technically, but they > do show disturbingly similar philosophies - like making NULL = NULL by > default because many clients with poorly trained developers asked for > it. You're right; MySQL is orders of magnitude better than Sybase. I'm dead serious. (I've been doing work in Sybase lately and I have to tell you: T-SQL is so damn awful, it would probably be better off without any stored procedure capability than to have it.) And, where are you getting your misinformation about MySQL about? Here's a test I did just now (MySQL 4.1.11): mysql> create table dossy (x int, y int); Query OK, 0 rows affected (0.07 sec) mysql> insert into dossy (x, y) values (1, 1), (2, 2), (3, NULL), (4, NULL); Query OK, 4 rows affected (0.00 sec) Records: 4 Duplicates: 0 Warnings: 0 mysql> select * from dossy where y = NULL; Empty set (0.00 sec) mysql> select * from dossy where y IS NULL; +------+------+ | x | y | +------+------+ | 3 | NULL | | 4 | NULL | +------+------+ 2 rows in set (0.00 sec) MySQL is far more standards-compliant than Sybase. Did you know that Sybase silently promotes an empty string to a string of 1 character? You can't actually store an empty string in a Sybase database. That is absolutely ridiculous. I'd expect that kind of behavior from some college-level pidgin databases class project, not from something people are expected to pay real money for. Sybase's TEXT/IMAGE support is ridiculous. You can't create stored procedures which take parameters that are typed TEXT or IMAGE? You have to jump through ridculous hoops with VARBINARY pointers and READTEXT/WRITETEXT? I suppose Oracle's not much better in this regard, with all their DBMS_LOB package shenanigans. MySQL claims any data type can be used as a stored procedure parameter -- I'll have to test to see how it handles BLOB and CLOB types. -- Dossy -- Dossy Shiobara | [EMAIL PROTECTED] | http://dossy.org/ Panoptic Computer Network | http://panoptic.com/ "He realized the fastest way to change is to laugh at your own folly -- then you can let go and quickly move on." (p. 70) -- AOLserver - http://www.aolserver.com/ To Remove yourself from this list, simply send an email to <[EMAIL PROTECTED]> with the body of "SIGNOFF AOLSERVER" in the email message. You can leave the Subject: field of your email blank.