now at the time of insertion i will enter like this
insert into test10 values ('book' ,1)
but at the time of display in the table i want
item state
book true
from above i want to ask that when i am going to insert 1 i want to
get true and 0 as false.I never enter true or false in the insert
command. please help me in coding and with an example.
thankyou,
lucky.
Cette action est irreversible, confirmez la suppression du commentaire ?
Signaler le commentaire
Veuillez sélectionner un problème
Nudité
Violence
Harcèlement
Fraude
Vente illégale
Discours haineux
Terrorisme
Autre
Philippe T [MS]
Bonjour,
This is a french newsgroup !!!
Why do you want to display true / false ? You can do that when you retreive your data from the table :
SELECT item, CASE state WHEN 1 THEN 'True' ELSE 'False' END AS state
---------------------------------------------------------------------- Philippe TROTIN - Microsoft Service France
"lucky" wrote in message news:
Hai, Here is a query that i am creating a table
create table test10 (item varchar(10),state bit)
now at the time of insertion i will enter like this
insert into test10 values ('book' ,1)
but at the time of display in the table i want
item state book true
from above i want to ask that when i am going to insert 1 i want to get true and 0 as false.I never enter true or false in the insert command. please help me in coding and with an example. thankyou, lucky.
Bonjour,
This is a french newsgroup !!!
Why do you want to display true / false ? You can do that when you retreive
your data from the table :
SELECT item, CASE state WHEN 1 THEN 'True' ELSE 'False' END AS state
----------------------------------------------------------------------
Philippe TROTIN - Microsoft Service France
"lucky" <j.v.s.s.baba@gmail.com> wrote in message
news:1142489614.598877.230180@i39g2000cwa.googlegroups.com...
Hai,
Here is a query that i am creating a table
create table test10 (item varchar(10),state bit)
now at the time of insertion i will enter like this
insert into test10 values ('book' ,1)
but at the time of display in the table i want
item state
book true
from above i want to ask that when i am going to insert 1 i want to
get true and 0 as false.I never enter true or false in the insert
command. please help me in coding and with an example.
thankyou,
lucky.
Why do you want to display true / false ? You can do that when you retreive your data from the table :
SELECT item, CASE state WHEN 1 THEN 'True' ELSE 'False' END AS state
---------------------------------------------------------------------- Philippe TROTIN - Microsoft Service France
"lucky" wrote in message news:
Hai, Here is a query that i am creating a table
create table test10 (item varchar(10),state bit)
now at the time of insertion i will enter like this
insert into test10 values ('book' ,1)
but at the time of display in the table i want
item state book true
from above i want to ask that when i am going to insert 1 i want to get true and 0 as false.I never enter true or false in the insert command. please help me in coding and with an example. thankyou, lucky.