adspace
how we can store the value like that 001,003,023 etc in sql
server 2005
Answer Posted / gopi muluka
Using Character Datatypes
See this
CREATE TABLE NumAsVar (Num VARCHAR(50))
INSERT INTO NumAsVar VALUES ('001')
INSERT INTO NumAsVar VALUES ('002')
INSERT INTO NumAsVar VALUES ('021')
SELECT * FROM NumAsVar
| Is This Answer Correct ? | 12 Yes | 5 No |
Post New Answer View All Answers
How raid can influence database performance?
What is a scheduled job or what is a scheduled task?
This question asked during interview, 2) At the end of each month, a new table is created for each bank that contains monthly metrics consolidated at the account level. The table naming convention is bankX_YYYYMM where X represents the numeric designation of the bank and YYYYMM indicates the 4 digit year and 2 digit month. The tables contain the following fields: name data type description account text account number registered boolean indicates whether the account is registered num_trans integer number of transactions made during the time period spend numeric(9,2) total spend during the time period a) Write a SQL query that will display the total number of transactions and total spend for "Bank1" during the 4th quarter of 2009. b) Write a SQL query that will display the total number of transactions and total spend at "Bank1" and "Bank2", broken out by registered vs. non-registered accounts, during January 2010 not sure what is correct answer and how to solve?
What is in place upgrade in sql server?
Why should you use or avoid select * statements?
Why use identity in sql server?
What are the different SQL Server Versions you have worked on?
What is clustered index
How can I check that whether automatic statistic update is enabled or not?
When should you use an instead of trigger?
What is self contained sub query?
What are the source of constraints?
How to provide default values to function parameters?
what is spatial nonclustered index
How to rebuild the master database?