How can we add a column to a table without altering the
same?
Answers were Sorted based on User's Feedback
Answer / 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 |
Answer / sandip
Thanks Devraj.
But i just mean is their any way of adding colum without
using alter statement?
| Is This Answer Correct ? | 8 Yes | 9 No |
Answer / sanjay rawat
In oracle,
1. take data in new table from existing table
2. add a new column in new table by using alter command
3. drop existing table
4. rename new table with existing table name
5. Check by select query
| Is This Answer Correct ? | 1 Yes | 3 No |
Answer / devraj
In Oracle - create nother table with new column
2. insert complete data into this
3. drop orignal table
4. rename the created table to orignal table
| Is This Answer Correct ? | 12 Yes | 26 No |
Explain coalesce.
what is the architechure of sybase ASE?
Why am I running out of locks on the replicate side in sybase ?
Explain index covering? List its merits.
How can I tell the datetime my server started?
What is the maximum nesting level of Stored Procedure and Triggers in Sybase?
Is sybase a database? Explain.
What is sybase used for?
How to swap a db device with another?
In sybase, we can have multiple users associated to same login ,each corresponds to different databases, right? how can we login to one database with corresponding user id?
What is a coalesce? What is the equivalent of oracle/db2 coalesce function in sybase?
State some of the criticism about sybase iq?
Oracle (3259)
SQL Server (4518)
MS Access (429)
MySQL (1402)
Postgre (483)
Sybase (267)
DB Architecture (141)
DB Administration (291)
DB Development (113)
SQL PLSQL (3330)
MongoDB (502)
IBM Informix (50)
Neo4j (82)
InfluxDB (0)
Apache CouchDB (44)
Firebird (5)
Database Management (1411)
Databases AllOther (288)