Hi, try this: "create table mytable select max(id),space(1) name from mytable2" and then this: "alter table mytable modify name varchar(255)"
Danilo Maurizio -----Messaggio originale----- Da: Ilyas Keser [mailto:[EMAIL PROTECTED]] Inviato: marted́ 27 agosto 2002 15.56 A: [EMAIL PROTECTED] Oggetto: select in create Can I also use a select statement in a create statement. Something like this: create table mytable ( id int not null primary key (select max(id) from mytable2), name varchar(255) ); is this possible or is there an other way to do something like this? ilyas filter: mysql --------------------------------------------------------------------- Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php --------------------------------------------------------------------- Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php