Thanks for a moral booster in recession :-D
sunilsb
Posts
-
What a trillion dollars looks like -
Couple questions migrating to MySQLANS 1: Thats correct. ANS 2: You are right. One can not use CURRENT_TIMESTAMP() function as a defult value for DATE and DATETIME datatypes in MySQL. However, this function can be used in TIMESTAMP datatype. Additionally, one can also use NOW() function as a defult value for TIMESTAMP datatype. ANS 3: MAX can not be used for VARBINARY. The allowable maximum length is the same for VARBINARY as it is VARCHAR, except that the length for VARBINARY is a length in bytes rather than in characters. ANS 4,5: Thats the way! ANS 6: Variables can be declared and accessed outside Procedure and Functions as follows: --------------------------------------- mysql> SET @a = 1; Query OK, 0 rows affected (0.00 sec) mysql> select @a; +------+ | @a | +------+ | 1 | +------+ 1 row in set (0.01 sec) --------------------------------------- ANS 7: SELECT statements can used directly in Procedures/Functions in MySQL for viewing desired output as follows: --------------------------------------- mysql> DELIMITER // mysql> CREATE PROCEDURE print_test() -> BEGIN -> SELECT 'This is test printing' AS "Output"; -> END; -> // Query OK, 0 rows affected (0.00 sec) mysql> DELIMITER ; mysql> call print_test(); +-----------------------+ | Output | +-----------------------+ | This is test printing | +-----------------------+ 1 row in set (0.00 sec) ---------------------------------------
-
SQLExecute failureThis could either be the MySQL Server version issue. Check whether it is 4.1 or above
-
How to store an image in PostGresDB?I have created a table with "bytea" datatype column. (I have not used oid datatype intentionally as its a pointer) I am using Windows XP machine. How can I store an image here? Like in MySQL, actual image can be stored in a table with BLOB or Medium BLOB datatype.
-
SQLExecute failureHave you tried changing the "wait_timeout" server variable?
-
Retrieve imageOne can retrieve image data from BLOB filed just by using Select statement :)