Results 1 to 7 of 7
  1. #1
    Join Date
    Mar 2007
    Posts
    77

    Unanswered: mySQL support for constants?

    Hi to all,

    I want to ask if MySQL version 5.0 or later supports variable constants?
    Like in any programmling languages like Visual Basic 6, you can declare a constant variable and refer to it through the lifetime of your program?
    It also won't allow its value to be modified.

    Does mySQL have that feature? or we just have to declare a variable and put a default value to it?

    thanks and god bless all!

  2. #2
    Join Date
    Apr 2002
    Location
    Toronto, Canada
    Posts
    20,002
    has had that feature since version 3.23

    http://dev.mysql.com/doc/refman/4.1/...variables.html
    rudy.ca | @rudydotca
    Buy my SitePoint book: Simply SQL

  3. #3
    Join Date
    Mar 2007
    Posts
    77
    Ok, but still the variable can be modifie. I am asking technically if there are variables similar to that of VB6, which , cannot be modified

  4. #4
    Join Date
    Apr 2002
    Location
    Toronto, Canada
    Posts
    20,002
    this begs the question, why aren't you actually using vb6 if that's what you want?
    rudy.ca | @rudydotca
    Buy my SitePoint book: Simply SQL

  5. #5
    Join Date
    Mar 2007
    Posts
    77
    Don't get me wrong, but I am only asking for that kind of feature in mySQL.

  6. #6
    Join Date
    Mar 2007
    Location
    636f6d7075746572
    Posts
    770
    I hate to think what would happen if you filled up the cache of MySQL with constants... Why do you need a constant in MySQL, that is the real question? I see no need for such a thing, and I don't believe any other DBs are utilising this. Why don't you just use a table of constants

  7. #7
    Join Date
    Mar 2007
    Posts
    77
    very well said

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •