Jump to content

TERADATA HELF FLEASE


Babu_Moshai

Recommended Posts

Vuncles need some helf with my assignment. DB course lo maaku Teradata isntall sesuko mananru. one question is that  oka exisiting table with data  ki identity column add cheyyali. unna records ki aa column oka default value ichi next insert row nunchi populate cheyyali

Link to comment
Share on other sites

Technically, you cannot add an identity column to an existing table or add an identity attribute to an existing column bro. (For Teradata SQL)

The round about way is to create a new table with same schema plus added identity column, insert the data and rename to swap both table names. 

Link to comment
Share on other sites

You can add an identity column using the code below: 

ALTER TABLE MyTable

     ADD ID INT IDENTITY(1,1) NOT NULL

After you do this one, every new row that you insert, the identity column will be incremented by 1. 

 

 

Link to comment
Share on other sites

2 minutes ago, RachaRaja said:

You can add an identity column using the code below: 

ALTER TABLE MyTable

     ADD ID INT IDENTITY(1,1) NOT NULL

After you do this one, every new row that you insert, the identity column will be incremented by 1. 

 

 

Bro, Are you sure this works for Teradata? 

I know it works for MS SQL Server and Other SQL based DBs/DWs but I don't think it works for Teradata Bro. 

Link to comment
Share on other sites

24 minutes ago, Babu_Moshai said:

Vuncles need some helf with my assignment. DB course lo maaku Teradata isntall sesuko mananru. one question is that  oka exisiting table with data  ki identity column add cheyyali. unna records ki aa column oka default value ichi next insert row nunchi populate cheyyali

You can not alter existence table bro

create new table only option 

Link to comment
Share on other sites

1 minute ago, Suhaas said:

Bro, Are you sure this works for Teradata? 

I know it works for MS SQL Server and Other SQL based DBs/DWs but I don't think it works for Teradata Bro. 

It won't work bro 

  • Like 1
Link to comment
Share on other sites

5 minutes ago, Suhaas said:

Bro, Are you sure this works for Teradata? 

I know it works for MS SQL Server and Other SQL based DBs/DWs but I don't think it works for Teradata Bro. 

Yeah you are right. This is not possible in teradata. It only works for SQL. My bad.

 

You got only one option is to create a new schema with identity column. 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...