简体   繁体   English

如何将表添加到sql并将其定义到现有表

[英]how to add a table to sql and define it to existing table

I am working with phpbb and I have this to go with. 我正在使用phpbb,我有这个要配合。

add to phpbb_topics 添加到phpbb_topics

Field: poll_show_votes
Type: TINYINT
Length/Values: 2
Attribute: UNSIGNED
Null: not null
Default: 0

Now I know how to do it in my phpmyadmin but i do not know how to convert it to a SQL query. 现在,我知道如何在phpmyadmin中执行此操作,但不知道如何将其转换为SQL查询。

can someone please explain how I would do this. 有人可以解释一下我该怎么做。

ALTER table phpbb_topics
ADD poll_show_votes TINYINT(2) UNSIGNED NOT NULL DEFAULT 0

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM