How can we add a column to a table without altering the
same?

Answer Posted / shoaib

you can add new column by using CAST keyword.

Eg:

Suppose your existing table say #EMP contain the following
Columns:

empid,
empname,
empaddr

you want to add empsal columns.

Query:
select
empid,
empname,
empaddr,
(null as decimal(18,2))empsal
from #EMP
into #EMP1;

Is This Answer Correct ?    18 Yes 10 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is cmaxpktsz good for in sybase?

470


You need to multiply all values of a single column. How would you do that?

479


Why do my page locks not get escalated to a table lock after 200 locks?

464


How do I remove duplicate rows from a table in sybase?

484


What causes re-resolution of a stored procedure in sybase?

472






How to check if sybase database is up and running?

416


Why place tempdb and log on low numbered devices?

421


What is open server in sybase?

454


Explain timestemp datatype in sybase.

537


How do I turn off marked suspect on my database in sybase?

492


How would you replicate col = col + 1 in sybase?

545


How to divide by zero and nulls in sybase?

502


How to remove row affected and dashes?

439


How would you configure burn factor in sybase?

485


What is sybase? What are its important features?

506