Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

What does (0) in a SQL server table represent

Posted on 2014-10-12
6
Medium Priority
?
83 Views
Last Modified: 2014-10-13
I see for the default value in a table (0)... Whats the difference between a default of 0 and (0) ?
0
Comment
Question by:upobDaPlaya
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
6 Comments
 
LVL 11

Expert Comment

by:HuaMinChen
ID: 40376222
I think it is having no difference from 0.
0
 
LVL 11

Assisted Solution

by:HuaMinChen
HuaMinChen earned 1000 total points
ID: 40376223
It means both are the same.
0
 

Author Comment

by:upobDaPlaya
ID: 40376235
what do you mean by having no difference from 0 ?  thx
0
Free Backup Tool for VMware and Hyper-V

Restore full virtual machine or individual guest files from 19 common file systems directly from the backup file. Schedule VM backups with PowerShell scripts. Set desired time, lean back and let the script to notify you via email upon completion.  

 
LVL 11

Expert Comment

by:HuaMinChen
ID: 40376238
I think you need to bracket 0 in the statement.
0
 
LVL 49

Accepted Solution

by:
PortletPaul earned 1000 total points
ID: 40376473
Absolutely no difference, except the syntax being used

This result:
| ID |      DETAILS | A | B | C | D | E | F | G | H |
|----|--------------|---|---|---|---|---|---|---|---|
|  1 | (one) or one | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |

Open in new window

Produce by this DDL:
CREATE TABLE Table1
	(
       id int identity primary key  , details varchar(30)
       
     , [a] float default (0)           , [b] float default 0
     , [c] int default (0)             , [d] int default 0 
     , [e] decimal(12,3)  default (0)  , [f] decimal(12,3) default 0
     , [g] money default (0)           , [h] money default 0
    )
;
	
INSERT INTO Table1
	([details])
VALUES
	('(one) or one')
;

Open in new window

select
*
from table1

Open in new window

http://sqlfiddle.com/#!3/9f048/2
0
 

Author Closing Comment

by:upobDaPlaya
ID: 40379186
Thanks all.  Thanks Porter for the query, that did a great job of demonstrating the issue and answer. Great job !
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
In part one, we reviewed the prerequisites required for installing SQL Server vNext. In this part we will explore how to install Microsoft's SQL Server on Ubuntu 16.04.
Familiarize people with the process of utilizing SQL Server functions from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Microsoft Ac…
Via a live example, show how to extract information from SQL Server on Database, Connection and Server properties

721 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question