Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Database & SysAdmin
  3. Database
  4. syntax in interger and string in SQL

syntax in interger and string in SQL

Scheduled Pinned Locked Moved Database
databasetestingbeta-testingquestion
5 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A Offline
    A Offline
    angelagke
    wrote on last edited by
    #1

    INSERT titles (title, cost) VALUES ('testing', '35') why SQL statement above can work? since the 35 is interger and not a string, so shount not be include '' for interger value.... :confused: angela

    A E 2 Replies Last reply
    0
    • A angelagke

      INSERT titles (title, cost) VALUES ('testing', '35') why SQL statement above can work? since the 35 is interger and not a string, so shount not be include '' for interger value.... :confused: angela

      A Offline
      A Offline
      albCode
      wrote on last edited by
      #2

      Sure it works u can add values as integer too (for integer filed) ur example works as this: INSERT titles (title, cost) VALUES ('testing', 35)

      A 1 Reply Last reply
      0
      • A angelagke

        INSERT titles (title, cost) VALUES ('testing', '35') why SQL statement above can work? since the 35 is interger and not a string, so shount not be include '' for interger value.... :confused: angela

        E Offline
        E Offline
        Eric Dahlvang
        wrote on last edited by
        #3

        Automatic data type conversion. ---------- Some problems are so complex that you have to be highly intelligent and well informed just to be undecided about them. - Laurence J. Peters

        A 1 Reply Last reply
        0
        • A albCode

          Sure it works u can add values as integer too (for integer filed) ur example works as this: INSERT titles (title, cost) VALUES ('testing', 35)

          A Offline
          A Offline
          angelagke
          wrote on last edited by
          #4

          i know, because i test before.. but i don't know why i can work....:| angela

          1 Reply Last reply
          0
          • E Eric Dahlvang

            Automatic data type conversion. ---------- Some problems are so complex that you have to be highly intelligent and well informed just to be undecided about them. - Laurence J. Peters

            A Offline
            A Offline
            angelagke
            wrote on last edited by
            #5

            oic, no wonder it works lah;) thanks ya..:) angela

            1 Reply Last reply
            0
            Reply
            • Reply as topic
            Log in to reply
            • Oldest to Newest
            • Newest to Oldest
            • Most Votes


            • Login

            • Don't have an account? Register

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • World
            • Users
            • Groups