> Alternatively one could use a "TRIGGER" that updates the start_yr_mo
> whenever start_date is modified but I'm unsure if triggers are present
> before 5.1.
Triggers are new in 5.0
Martijn Tonies
Database Workbench - development tool for MySQL, and more!
Upscene Productions
http://www.upscene.c
Hi
On 2006-11-05 Bill Guion wrote:
> In one of my tables I have a start_date - timestamp (2007-07-04). A
> separate column, start_yr_mo, has 200704 (first seven characters of
> timestamp without the '-'). Both are entered manually. Can I define
> start_yr_mo as a default of, for example, set st
In one of my tables I have a start_date - timestamp (2007-07-04). A
separate column, start_yr_mo, has 200704 (first seven characters of
timestamp without the '-'). Both are entered manually. Can I define
start_yr_mo as a default of, for example, set start_yr_mo =
concat(substr(start_date, 1, 4)
Thanks Jay. Yeah, I'll just write a trigger... It sure would be cool though
if you could say something like..." ADD COLUMN new_column VARCHAR(100)
DEFAULT LOWER(new_column) " and then be done without having to
explicitly define a trigger for it.
This is for a userid field. Userid values at my
You could always use a trigger on BEFORE UPDATE/BEFORE INSERT which
changes NEW.column to LOWER(column). I know it's not declarative, but
it works.
sheeri kritzer wrote:
Not that I know of, but if you don't do binary (case-sensitive)
searching then does it really matter?? You can retrieve wit
> I have column and I want to make sure the db is always making sure the
value
> that gets input into this VARCHAR() column is always lowercase;
>
> Is there a way to set the value of a column within a table to
automatically
> be lowercase. I know how to use the LOWER() function when performing
q
Not that I know of, but if you don't do binary (case-sensitive)
searching then does it really matter?? You can retrieve with LOWER, or
put it in your application, if your application needs to display it
that way.
-Sheeri
On 5/18/06, Ferindo Middleton <[EMAIL PROTECTED]> wrote:
I have column and
I have column and I want to make sure the db is always making sure the value
that gets input into this VARCHAR() column is always lowercase;
Is there a way to set the value of a column within a table to automatically
be lowercase. I know how to use the LOWER() function when performing queries
but
Harald Fuchs wrote:
In article <[EMAIL PROTECTED]>,
Daniel Kasak <[EMAIL PROTECTED]> writes:
Bryan Cantwell wrote:
Trying to migrate to MySql 5 from Sybase asa. I have a tables that
have column values that are calculated based on other columns in the
table. How can I accomplish the sa
In article <[EMAIL PROTECTED]>,
Daniel Kasak <[EMAIL PROTECTED]> writes:
> Bryan Cantwell wrote:
>> Trying to migrate to MySql 5 from Sybase asa. I have a tables that
>> have column values that are calculated based on other columns in the
>> table. How can I accomplish the same in MySql?
>>
> Thi
Bryan Cantwell wrote:
Trying to migrate to MySql 5 from Sybase asa. I have a tables that
have column values that are calculated based on other columns in the
table. How can I accomplish the same in MySql?
This sounds a job for a trigger - an insert trigger.
I haven't used triggers in mysql,
Trying to migrate to MySql 5 from Sybase asa. I have a tables that have
column values that are calculated based on other columns in the table. How can
I accomplish the same in MySql?
Here is sample of my asa table:
CREATE TABLE "DBA"."OpptyDetail"
(
"OpptyDetailID"
Does anyone know of a way to use a SELECT statement to get the default value
for a column?
A DESCRIBE tabl_name col_name gives the values, but I need it inside a
SELECT.
Thanks.
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.my
13 matches
Mail list logo