In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-07 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)06/01 Report--
Recently, in the process of writing SQL, I found that I need to adjust the structure of a table (here is SQL Server), in which multiple columns need to be deleted. Since the previous SQL statement deleted a column, I wondered if it was possible to delete multiple columns with one statement at the same time. If so, how to write it?
The first conjecture is as follows (note: here is the conjecture, incorrect writing):
ALTER TABLE TableName DROP COLUMN column1,column2
But after execution, a syntax error was found, so it was changed to the following way:
ALTER TABLE TableName DROP COLUMN column1,COLUMN column2
Execute correctly, then look at the table structure and find that the column has been deleted, which proves that the conjecture is correct.
The above is the editor introduced to you SQL delete multi-column sentence writing, I hope to help you, if you have any questions, please leave me a message, the editor will reply to you in time. Thank you very much for your support to the website!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.