Schema

  • I have sysadmin access to the sql server, long time back i created SQL User called DB_SQL and I created some table which was created DB_SQL.table1. Now I want to create some more table and I forget the password. The problem is we cannot change the password.

    Is there any way I can create table with DB_SQL.Table_new. since all the new tables is getting created by default dbo.all_tables

  • When you specify the schame name in the CREATE command, the table will be created in the mentioned schema

    CREATE TABLE [DB_SQL].[table_new] (column datatype, ....)

    ** Don't mistake the ‘stupidity of the crowd’ for the ‘wisdom of the group’! **
  • create table DB_SQL.Table_new(col definitions)

    or you could create the dbo table and do this:

    alter schema DB_SQL transfer dbo.Table_new

  • Thanks Can I rename the table which has a DBO.Tablename as DB_SQL.Tablename

  • no, but you can do this:

    alter schema DB_SQL transfer dbo.Tablename

  • Thanks everyone it was a great help

Viewing 6 posts - 1 through 6 (of 6 total)

You must be logged in to reply to this topic. Login to reply