07-12-2012 03:44 AM
Hi All,
Ca anybody Explain me how to delete the perticular entire column in a table.
Regards,
Srinath
07-12-2012 05:34 AM
I think you can not delete a complete coulmn from the table in the database.
either you have to create new table in the database.
or else you can delete values from the selected cloumn by writing delete query. (
07-12-2012 05:39 AM
Just note for you
WHERE clause in the DELETE syntax. The WHERE clause specifies which record or records that should be deleted. If you omit the WHERE clause, all records will be deleted!
07-12-2012 05:41 AM
It is possible to delete all rows in a table without deleting the table. This means that the table structure, attributes, and indexes will be intact
Use following query
07-12-2012 10:16 AM
Did you even try a google search for deleting a column with SQL? Of course not, otherwise you would not be asking the question, I guess. Why you think this is a LabVIEW question, I have no idea, though. Look up the ALTER TABLE syntax.
07-12-2012 10:59 AM
Correct.
Just Check with the SQL Help
07-12-2012 01:43 PM
Do you want to delete a column, or change the value of a field (column name) of all records to nothing (NULL).
If you want to clear/change to NULL then you can use an UPDATE statement, but this is not something that you 'just play around with'
07-13-2012 12:51 AM
Example of Update statement is
07-13-2012 04:14 AM
Hi Patil,
Can you Explainme how to rename the Column name in a table
Regards,
srianth
07-13-2012 06:38 AM
You can use foolwing statement to rename column name
sp_RENAME 'TableName.[OldColumnName]' , '[NewColumnName]', 'COLUMN'
More in details
USE [Database name]
GO
sp_RENAME 'TableName.[OldColumnName]' , '[NewColumnName]', 'COLUMN'
GO