Yes, I know you can right click on table [Script Table as]->[CREATE To] and yes you can create your own procedure to generate 'CREATE TABLE' script. Question is, do SQL Server has any build-in procedure to auto generate 'CREATE TABLE' query?
UPDATE: I already have all table information, question is do sql-sever has any table that stores auto-generated scripts or does it have any procedure that you can run and that can give you create,insert,update scripts for table?
select '['+name+']'+' ['+type_name(system_type_id)+']'+
case when is_ansi_padded=1 then '('+cast(max_length as varchar)+')' else '' end + case when is_nullable=1 then ' NULL' else ' NOT NULL' end+','
from sys.all_columns where object_id='132456'
order by column_id