Click here to Skip to main content
15,897,704 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
hi
Iam creating one table

SQL
Create table Reservation1
( code varchar(250), Status varchar(250),Guestname varchar(250), GuestEmail varchar(250),Guestphoneno varchar(250),checkin varchar(250), checkout varchar(250),adultno varchar(250),childno varchar(250), Infantno varchar(250),Nettotal varchar(250),dis varchar(250), Tax varchar(250), total varchar(250)
);



but it doesnt take the spaces

like i want guest Name..what can i do


again in grid view first column will get star..why * comming
Posted
Updated 12-Apr-14 0:03am
v2

If you want spaces in your column names (why on earth would you want that????) then you have to surround the name of the column with square brackets e.g.
[Guest Name] varchar(250)
Same is true if you are trying to use reserved words like 'Name' by themselves e.g.
[Name] varchar(250)
works but e.g.
Name varchar(250)
will fail
 
Share this answer
 
enclose it with square brackets:
[guest Name]
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900