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. MySQL
  4. Multiply two field

Multiply two field

Scheduled Pinned Locked Moved MySQL
tutorialquestion
4 Posts 2 Posters 20 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.
  • M Offline
    M Offline
    mjawadkhatri
    wrote on last edited by
    #1

    How to multiply two field value ?? Like i Have a table prod........dept..qty..rate..date mouse.......abc...10...20....5/1/2010 monitor.....xyz...5....10....5/2/2010 mouse.......abc...12...20....5/3/2010 monitor.....xyz...15...10....5/4/2010 Keyboard....abc...20....8....5/5/2010 now i want to show my record like Dept.........(QTY*Rate) abc...........600 xyz...........200 Thanks In Advance Jawad Khatri

    L 1 Reply Last reply
    0
    • M mjawadkhatri

      How to multiply two field value ?? Like i Have a table prod........dept..qty..rate..date mouse.......abc...10...20....5/1/2010 monitor.....xyz...5....10....5/2/2010 mouse.......abc...12...20....5/3/2010 monitor.....xyz...15...10....5/4/2010 Keyboard....abc...20....8....5/5/2010 now i want to show my record like Dept.........(QTY*Rate) abc...........600 xyz...........200 Thanks In Advance Jawad Khatri

      L Offline
      L Offline
      Luc Pattyn
      wrote on last edited by
      #2

      try this:

      SELECT qty * rate AS product FROM table WHERE ...

      It is in the documentation[^]! :)

      Luc Pattyn [Forum Guidelines] [Why QA sucks] [My Articles] Nil Volentibus Arduum

      Please use <PRE> tags for code snippets, they preserve indentation, and improve readability.

      M 1 Reply Last reply
      0
      • L Luc Pattyn

        try this:

        SELECT qty * rate AS product FROM table WHERE ...

        It is in the documentation[^]! :)

        Luc Pattyn [Forum Guidelines] [Why QA sucks] [My Articles] Nil Volentibus Arduum

        Please use <PRE> tags for code snippets, they preserve indentation, and improve readability.

        M Offline
        M Offline
        mjawadkhatri
        wrote on last edited by
        #3

        Thanks Sir

        L 1 Reply Last reply
        0
        • M mjawadkhatri

          Thanks Sir

          L Offline
          L Offline
          Luc Pattyn
          wrote on last edited by
          #4

          you're welcome. :)

          Luc Pattyn [Forum Guidelines] [Why QA sucks] [My Articles] Nil Volentibus Arduum

          Please use <PRE> tags for code snippets, they preserve indentation, and improve readability.

          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