Overclock.net banner
1 - 4 of 4 Posts

·
Premium Member
Joined
·
18,618 Posts
Discussion Starter · #1 ·
Really ******ed question, but I have forgot how to do this and can't actually find anywhere to help.

If i add a new field like so:

Code:
Code:
mysql> create table userquintin ( user_id int PRIMARY KEY NOT NULL UNIQUE AUTO_INCREMENT );
Query OK, 0 rows affected (0.00 sec)
How do i do multiple fields in one line rather than having to ALTER the table each time to add a new field?
 

·
Premium Member
Joined
·
18,618 Posts
Discussion Starter · #3 ·
Just on seperate lines, how stupid of me. I knew it was something simple. Cheers
 
  • Rep+
Reactions: StarryNite

·
Registered
Joined
·
240 Posts
it can be on the same line. I just like doing it like that because it is easier to read.

Code:
Code:
CREATE TABLE tablename ( col_01 datatype, col_02 datatype, col_03 datatype );
 
1 - 4 of 4 Posts
Top