SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Zealot sike's Avatar
    Join Date
    Oct 2002
    Posts
    174
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    automatic type conversion

    hey guys,

    i have one question regarding automatic type conversion in INSERT and UPDATE queries on different DMBS.

    in mysql you can do the following :

    INSERT INTO person (name, age) VALUES ('foo', '26')

    mysql will convert the '26' to an integer if the field is declared as integer. is this supported by all other databases (PostgreSQL, Oracle, MSSQL) ?

    cheers,
    Sike

  2. #2
    SitePoint Guru
    Join Date
    Jan 2004
    Location
    Uppsala, sverige
    Posts
    696
    Mentioned
    2 Post(s)
    Tagged
    1 Thread(s)
    No.

    You should not use that syntax in Mysql either.


Bookmarks

Posting Permissions

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