forums › forums › SQLyog › SQLyog Comments › ADDING COLUMN COMMENTS
- This topic is empty.
-
AuthorPosts
-
-
November 11, 2003 at 9:13 am #8238dennisMember
Hi,
In version 3.62, this works fine :
CREATE TABLE test(
id int NOT NULL auto_increment COMMENT 'this is a comment',
PRIMARY KEY (id)
) TYPE=MyISAM;
and even better, it appears in the HTML Schema generated by WebYog. Fine. But that's good
when creating a table.
However, I can't find the way to ALTER an existing column to add a comment. I've tried many
commands but can't make it.
Help !
Thanks,
Denis
-
November 11, 2003 at 11:52 am #15223ShadowMember
ALTER TABLE tb1 MODIFY col1 INTEGER UNSIGNED NOT NULL COMMENT 'blabla'
The trick is that after the column's name you have to specify the type (what you already have) of the column. Otherwise it won't work!
-
November 11, 2003 at 9:29 pm #15224dennisMember
I think you have 2 bugs in your latest 3.62 version :
1.Some of the comments appear when the tables are altered and disappear from the webyog interface after a few connections !
That's a drawback since I spent all day writing those comments !
2.Sometimes a column is rejected by an alter table query for comments. In one session the query is accepted, in other the column
is not accepted.
This makes things unstable.
I'll be trying workarounds will keep you posted. Hopefully, you'll get there before me.
-
November 12, 2003 at 11:23 am #15225ShadowMember
It is not SQLyog that rejects commands, but MySql itself! SQL commands are routed to MySql unaltered.
-
November 15, 2003 at 9:15 am #15226dennisMember
I understand that webyog sends SQL commands unaltered.
The thing is that from time to time (and I can't tell you why or when), some of these
commands go through, I can view the changes but when I go back into webyog, they've
disappeared (comments, table changes).
Question : I haven't used “commit” up to now after using webyog 's alter table functions or
even with my comments.
Should I end all sessions sending a commit to MySQL first ?
Well anyway, at some point we'll put our finder on this problem !
-
November 17, 2003 at 8:19 am #15227ShadowMember
If you use InnoDB or BDB table handler, then sending a commit may help, otherwise not, because the other table handlers are not transactional. As far as I am concerned, you cannot include more than one DDL command in one transaction. In fact, issuing a DDL command will wait until all pending transactions are completed, then gets executed and commited immediatelly.
By the way, I can still see the test comments I made a week ago…
-
-
AuthorPosts
- You must be logged in to reply to this topic.