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. Create Table

Create Table

Scheduled Pinned Locked Moved Database
questionsales
7 Posts 4 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.
  • P Offline
    P Offline
    prithaa
    wrote on last edited by
    #1

    Hello, If I want a table with decimal then what is te syntax I should use to create the table. I have doubt about the data type to be used "decimal(10,2)" Is the following right? Create Table Sales (Amt decimal(10,2)) Thanks Prithaa

    P 1 Reply Last reply
    0
    • P prithaa

      Hello, If I want a table with decimal then what is te syntax I should use to create the table. I have doubt about the data type to be used "decimal(10,2)" Is the following right? Create Table Sales (Amt decimal(10,2)) Thanks Prithaa

      P Offline
      P Offline
      pmarfleet
      wrote on last edited by
      #2

      Have you tried it?

      Paul Marfleet "No, his mind is not for rent To any God or government" Tom Sawyer - Rush

      P V 2 Replies Last reply
      0
      • P pmarfleet

        Have you tried it?

        Paul Marfleet "No, his mind is not for rent To any God or government" Tom Sawyer - Rush

        P Offline
        P Offline
        prithaa
        wrote on last edited by
        #3

        Hello, Yes I have tried it and it gives me field definition error. I think the problem lies in declaring right kind of data type . decimal(10,2) or numeric(10,2) doesn't work. Pritha

        P P 2 Replies Last reply
        0
        • P prithaa

          Hello, Yes I have tried it and it gives me field definition error. I think the problem lies in declaring right kind of data type . decimal(10,2) or numeric(10,2) doesn't work. Pritha

          P Offline
          P Offline
          pmarfleet
          wrote on last edited by
          #4

          The syntax you gave in your original post works for me. There must be another error in your code. Have you posted all your code?

          Paul Marfleet "No, his mind is not for rent To any God or government" Tom Sawyer - Rush

          1 Reply Last reply
          0
          • P prithaa

            Hello, Yes I have tried it and it gives me field definition error. I think the problem lies in declaring right kind of data type . decimal(10,2) or numeric(10,2) doesn't work. Pritha

            P Offline
            P Offline
            Pete OHanlon
            wrote on last edited by
            #5

            When posting a question like this, you may want to include information such as the database you are using. It could be that you we try something on SQL Server that works, and you think we're looking at Access.

            Deja View - the feeling that you've seen this post before.

            1 Reply Last reply
            0
            • P pmarfleet

              Have you tried it?

              Paul Marfleet "No, his mind is not for rent To any God or government" Tom Sawyer - Rush

              V Offline
              V Offline
              venkat vuppala
              wrote on last edited by
              #6

              try this create table( , , , .................., .................., .................., )

              P 1 Reply Last reply
              0
              • V venkat vuppala

                try this create table( , , , .................., .................., .................., )

                P Offline
                P Offline
                prithaa
                wrote on last edited by
                #7

                Hello, Thanks for your replies I am using this in Access.The statement Create Table Sales (Amt decimal(10,2)) is written in Access. I get the error Syntax error in field definition. Prithaa

                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