Raised This Month: $51 Target: $400
 12% 

SQL create column if not exists


Post New Thread Reply   
 
Thread Tools Display Modes
eyal282
Veteran Member
Join Date: Aug 2011
Old 08-09-2018 , 08:23   Re: SQL create column if not exists
Reply With Quote #11

Quote:
Originally Posted by Powerlord View Post
You can use ALTER TABLE to add new columns.

ALTER TABLE tablename ADD columname columntype

The more rows your table has, the longer ALTER TABLE will take.

Edit: Having said that, this is an operation you should be doing manually and as a one-off thing.
Yes. But how to do "ADD IF NOT EXISTS" to avoid mistakes?
__________________
I am available to make plugins for pay.

Discord: Eyal282#1334
eyal282 is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 07:17.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode