Hi ,
In sqlserver (2000 & 2005) for a Boolean column what datatype is best
supported in terms of performance and best practice.
For a BOOLEAN is it a
best practice to use CHAR(1) which stores (Y / N )
or
best practice to use INT which stores (0 / 1 )
Thanks In adv
ThirumaranThis depends somewhat on what you are going to do with it and how your
application will handle it. But I typically like to use a TINYINT. It only
takes up 1 byte but still allows you to expand from a simple Bool to a
status type value without changing the datatype. It is also cleaner in most
cases to deal with than a Bit datatype.
--
Andrew J. Kelly SQL MVP
"thirumaran" <thirumaran@.discussions.microsoft.com> wrote in message
news:A22D9167-8FE4-4018-85FF-84D0A0D31FBD@.microsoft.com...
> Hi ,
> In sqlserver (2000 & 2005) for a Boolean column what datatype is best
> supported in terms of performance and best practice.
> For a BOOLEAN is it a
> best practice to use CHAR(1) which stores (Y / N )
> or
> best practice to use INT which stores (0 / 1 )
> Thanks In adv
> Thirumaran
>
>
>|||It depends on your business requirements
It could be CHAR(1) which stores (Y / N ) or TINYINT 0/1 or BIT 0/1
It is worth to mention that you should not allow NULL's in that CASE or as
I said it depends on what you are trying to achive
"thirumaran" <thirumaran@.discussions.microsoft.com> wrote in message
news:A22D9167-8FE4-4018-85FF-84D0A0D31FBD@.microsoft.com...
> Hi ,
> In sqlserver (2000 & 2005) for a Boolean column what datatype is best
> supported in terms of performance and best practice.
> For a BOOLEAN is it a
> best practice to use CHAR(1) which stores (Y / N )
> or
> best practice to use INT which stores (0 / 1 )
> Thanks In adv
> Thirumaran
>
>
>
Showing posts with label practice. Show all posts
Showing posts with label practice. Show all posts
Thursday, March 29, 2012
Boolean in sqlserver 2000 and sqlserver 2005
Hi ,
In sqlserver (2000 & 2005) for a Boolean column what datatype is best
supported in terms of performance and best practice.
For a BOOLEAN is it a
best practice to use CHAR(1) which stores (Y / N )
or
best practice to use INT which stores (0 / 1 )
Thanks In adv
ThirumaranThis depends somewhat on what you are going to do with it and how your
application will handle it. But I typically like to use a TINYINT. It only
takes up 1 byte but still allows you to expand from a simple Bool to a
status type value without changing the datatype. It is also cleaner in most
cases to deal with than a Bit datatype.
Andrew J. Kelly SQL MVP
"thirumaran" <thirumaran@.discussions.microsoft.com> wrote in message
news:A22D9167-8FE4-4018-85FF-84D0A0D31FBD@.microsoft.com...
> Hi ,
> In sqlserver (2000 & 2005) for a Boolean column what datatype is best
> supported in terms of performance and best practice.
> For a BOOLEAN is it a
> best practice to use CHAR(1) which stores (Y / N )
> or
> best practice to use INT which stores (0 / 1 )
> Thanks In adv
> Thirumaran
>
>
>|||It depends on your business requirements
It could be CHAR(1) which stores (Y / N ) or TINYINT 0/1 or BIT 0/1
It is worth to mention that you should not allow NULL's in that CASE or as
I said it depends on what you are trying to achive
"thirumaran" <thirumaran@.discussions.microsoft.com> wrote in message
news:A22D9167-8FE4-4018-85FF-84D0A0D31FBD@.microsoft.com...
> Hi ,
> In sqlserver (2000 & 2005) for a Boolean column what datatype is best
> supported in terms of performance and best practice.
> For a BOOLEAN is it a
> best practice to use CHAR(1) which stores (Y / N )
> or
> best practice to use INT which stores (0 / 1 )
> Thanks In adv
> Thirumaran
>
>
>
In sqlserver (2000 & 2005) for a Boolean column what datatype is best
supported in terms of performance and best practice.
For a BOOLEAN is it a
best practice to use CHAR(1) which stores (Y / N )
or
best practice to use INT which stores (0 / 1 )
Thanks In adv
ThirumaranThis depends somewhat on what you are going to do with it and how your
application will handle it. But I typically like to use a TINYINT. It only
takes up 1 byte but still allows you to expand from a simple Bool to a
status type value without changing the datatype. It is also cleaner in most
cases to deal with than a Bit datatype.
Andrew J. Kelly SQL MVP
"thirumaran" <thirumaran@.discussions.microsoft.com> wrote in message
news:A22D9167-8FE4-4018-85FF-84D0A0D31FBD@.microsoft.com...
> Hi ,
> In sqlserver (2000 & 2005) for a Boolean column what datatype is best
> supported in terms of performance and best practice.
> For a BOOLEAN is it a
> best practice to use CHAR(1) which stores (Y / N )
> or
> best practice to use INT which stores (0 / 1 )
> Thanks In adv
> Thirumaran
>
>
>|||It depends on your business requirements
It could be CHAR(1) which stores (Y / N ) or TINYINT 0/1 or BIT 0/1
It is worth to mention that you should not allow NULL's in that CASE or as
I said it depends on what you are trying to achive
"thirumaran" <thirumaran@.discussions.microsoft.com> wrote in message
news:A22D9167-8FE4-4018-85FF-84D0A0D31FBD@.microsoft.com...
> Hi ,
> In sqlserver (2000 & 2005) for a Boolean column what datatype is best
> supported in terms of performance and best practice.
> For a BOOLEAN is it a
> best practice to use CHAR(1) which stores (Y / N )
> or
> best practice to use INT which stores (0 / 1 )
> Thanks In adv
> Thirumaran
>
>
>
Tuesday, March 20, 2012
Book
Can anyone recommend a sql2000 book that will also have alot of practice exa
mples?
ThanksPROFFESIONAL SQL SERVER PROGRAMMING
By Robert Vieira
WROX ISBN 1-861004-48-6
"rjrollins" <anonymous@.discussions.microsoft.com> wrote in message
news:B699BF10-8EDB-4518-ACB3-B68314713BF6@.microsoft.com...
> Can anyone recommend a sql2000 book that will also have alot of practice
examples?
> Thanks|||Is this book good for someone just learning sql?|||Be sure to download and take a look at BOL -
http://www.microsoft.com/downloads/...&DisplayLang=en
The MSPress books for SQL Server have lots of labs, etc.
Ray Higdon MCSE, MCDBA, CCNA
--
"rjrollins" <anonymous@.discussions.microsoft.com> wrote in message
news:B699BF10-8EDB-4518-ACB3-B68314713BF6@.microsoft.com...
> Can anyone recommend a sql2000 book that will also have alot of practice
examples?
> Thanks|||Hi,
PROFESSIONAL SQL SERVER 2000 programming is a good book
but for advanced users. Before reading the Professional
Edition, There is one more book you need to buy from the
same Wrox press BEGINNING SQL SERVER 2000 PROGRAMMING
I also have Murach's SQL for SQL Server which is a great
book for beginners.
HTH
Regards
Thirumal
>--Original Message--
>Is this book good for someone just learning sql?
>.
>|||Inside sql server
by kalen delany is also very good book
Regards
Ajay
"Thirumal" <treddym@.hotmail.nospam.com> wrote in message
news:14dd401c3f9b2$368078f0$a501280a@.phx
.gbl...
> Hi,
> PROFESSIONAL SQL SERVER 2000 programming is a good book
> but for advanced users. Before reading the Professional
> Edition, There is one more book you need to buy from the
> same Wrox press BEGINNING SQL SERVER 2000 PROGRAMMING
> I also have Murach's SQL for SQL Server which is a great
> book for beginners.
> HTH
> Regards
> Thirumal|||What kind of book are you after? one in which to learn admin/operation side
of sql server or one to learn how to use TSQL?
"rjrollins" <anonymous@.discussions.microsoft.com> wrote in message
news:B699BF10-8EDB-4518-ACB3-B68314713BF6@.microsoft.com...
> Can anyone recommend a sql2000 book that will also have alot of practice
examples?
> Thankssql
mples?
ThanksPROFFESIONAL SQL SERVER PROGRAMMING
By Robert Vieira
WROX ISBN 1-861004-48-6
"rjrollins" <anonymous@.discussions.microsoft.com> wrote in message
news:B699BF10-8EDB-4518-ACB3-B68314713BF6@.microsoft.com...
> Can anyone recommend a sql2000 book that will also have alot of practice
examples?
> Thanks|||Is this book good for someone just learning sql?|||Be sure to download and take a look at BOL -
http://www.microsoft.com/downloads/...&DisplayLang=en
The MSPress books for SQL Server have lots of labs, etc.
Ray Higdon MCSE, MCDBA, CCNA
--
"rjrollins" <anonymous@.discussions.microsoft.com> wrote in message
news:B699BF10-8EDB-4518-ACB3-B68314713BF6@.microsoft.com...
> Can anyone recommend a sql2000 book that will also have alot of practice
examples?
> Thanks|||Hi,
PROFESSIONAL SQL SERVER 2000 programming is a good book
but for advanced users. Before reading the Professional
Edition, There is one more book you need to buy from the
same Wrox press BEGINNING SQL SERVER 2000 PROGRAMMING
I also have Murach's SQL for SQL Server which is a great
book for beginners.
HTH
Regards
Thirumal
>--Original Message--
>Is this book good for someone just learning sql?
>.
>|||Inside sql server
by kalen delany is also very good book
Regards
Ajay
"Thirumal" <treddym@.hotmail.nospam.com> wrote in message
news:14dd401c3f9b2$368078f0$a501280a@.phx
.gbl...
> Hi,
> PROFESSIONAL SQL SERVER 2000 programming is a good book
> but for advanced users. Before reading the Professional
> Edition, There is one more book you need to buy from the
> same Wrox press BEGINNING SQL SERVER 2000 PROGRAMMING
> I also have Murach's SQL for SQL Server which is a great
> book for beginners.
> HTH
> Regards
> Thirumal|||What kind of book are you after? one in which to learn admin/operation side
of sql server or one to learn how to use TSQL?
"rjrollins" <anonymous@.discussions.microsoft.com> wrote in message
news:B699BF10-8EDB-4518-ACB3-B68314713BF6@.microsoft.com...
> Can anyone recommend a sql2000 book that will also have alot of practice
examples?
> Thankssql
Book
Can anyone recommend a sql2000 book that will also have alot of practice examples
ThanksPROFFESIONAL SQL SERVER PROGRAMMING
By Robert Vieira
WROX ISBN 1-861004-48-6
"rjrollins" <anonymous@.discussions.microsoft.com> wrote in message
news:B699BF10-8EDB-4518-ACB3-B68314713BF6@.microsoft.com...
> Can anyone recommend a sql2000 book that will also have alot of practice
examples?
> Thanks|||Is this book good for someone just learning sql?|||Be sure to download and take a look at BOL -
http://www.microsoft.com/downloads/details.aspx?FamilyID=a6f79cb1-a420-445f-8a4b-bd77a7da194b&DisplayLang=en
The MSPress books for SQL Server have lots of labs, etc.
--
Ray Higdon MCSE, MCDBA, CCNA
--
"rjrollins" <anonymous@.discussions.microsoft.com> wrote in message
news:B699BF10-8EDB-4518-ACB3-B68314713BF6@.microsoft.com...
> Can anyone recommend a sql2000 book that will also have alot of practice
examples?
> Thanks|||Hi,
PROFESSIONAL SQL SERVER 2000 PROGRAMMING is a good book
but for advanced users. Before reading the Professional
Edition, There is one more book you need to buy from the
same Wrox press BEGINNING SQL SERVER 2000 PROGRAMMING
I also have Murach's SQL for SQL Server which is a great
book for beginners.
HTH
Regards
Thirumal
>--Original Message--
>Is this book good for someone just learning sql?
>.
>|||Inside sql server
by kalen delany is also very good book
Regards
Ajay
"Thirumal" <treddym@.hotmail.nospam.com> wrote in message
news:14dd401c3f9b2$368078f0$a501280a@.phx.gbl...
> Hi,
> PROFESSIONAL SQL SERVER 2000 PROGRAMMING is a good book
> but for advanced users. Before reading the Professional
> Edition, There is one more book you need to buy from the
> same Wrox press BEGINNING SQL SERVER 2000 PROGRAMMING
> I also have Murach's SQL for SQL Server which is a great
> book for beginners.
> HTH
> Regards
> Thirumal
> >--Original Message--
> >Is this book good for someone just learning sql?
> >.
> >|||What kind of book are you after? one in which to learn admin/operation side
of sql server or one to learn how to use TSQL?
"rjrollins" <anonymous@.discussions.microsoft.com> wrote in message
news:B699BF10-8EDB-4518-ACB3-B68314713BF6@.microsoft.com...
> Can anyone recommend a sql2000 book that will also have alot of practice
examples?
> Thanks
ThanksPROFFESIONAL SQL SERVER PROGRAMMING
By Robert Vieira
WROX ISBN 1-861004-48-6
"rjrollins" <anonymous@.discussions.microsoft.com> wrote in message
news:B699BF10-8EDB-4518-ACB3-B68314713BF6@.microsoft.com...
> Can anyone recommend a sql2000 book that will also have alot of practice
examples?
> Thanks|||Is this book good for someone just learning sql?|||Be sure to download and take a look at BOL -
http://www.microsoft.com/downloads/details.aspx?FamilyID=a6f79cb1-a420-445f-8a4b-bd77a7da194b&DisplayLang=en
The MSPress books for SQL Server have lots of labs, etc.
--
Ray Higdon MCSE, MCDBA, CCNA
--
"rjrollins" <anonymous@.discussions.microsoft.com> wrote in message
news:B699BF10-8EDB-4518-ACB3-B68314713BF6@.microsoft.com...
> Can anyone recommend a sql2000 book that will also have alot of practice
examples?
> Thanks|||Hi,
PROFESSIONAL SQL SERVER 2000 PROGRAMMING is a good book
but for advanced users. Before reading the Professional
Edition, There is one more book you need to buy from the
same Wrox press BEGINNING SQL SERVER 2000 PROGRAMMING
I also have Murach's SQL for SQL Server which is a great
book for beginners.
HTH
Regards
Thirumal
>--Original Message--
>Is this book good for someone just learning sql?
>.
>|||Inside sql server
by kalen delany is also very good book
Regards
Ajay
"Thirumal" <treddym@.hotmail.nospam.com> wrote in message
news:14dd401c3f9b2$368078f0$a501280a@.phx.gbl...
> Hi,
> PROFESSIONAL SQL SERVER 2000 PROGRAMMING is a good book
> but for advanced users. Before reading the Professional
> Edition, There is one more book you need to buy from the
> same Wrox press BEGINNING SQL SERVER 2000 PROGRAMMING
> I also have Murach's SQL for SQL Server which is a great
> book for beginners.
> HTH
> Regards
> Thirumal
> >--Original Message--
> >Is this book good for someone just learning sql?
> >.
> >|||What kind of book are you after? one in which to learn admin/operation side
of sql server or one to learn how to use TSQL?
"rjrollins" <anonymous@.discussions.microsoft.com> wrote in message
news:B699BF10-8EDB-4518-ACB3-B68314713BF6@.microsoft.com...
> Can anyone recommend a sql2000 book that will also have alot of practice
examples?
> Thanks
Subscribe to:
Posts (Atom)