h1

Cum redenumim o bd si un camp deja creat

November 8, 2009

a) Cum redenumim o BD (schimbarea numelui initial al unei baze de date create cu CREATE DATABASE nume_BD)

Sa presupunem ca avem baza de date Categories din care selectam 2 campuri.

poza1

Efect:

poza2

Acum vom redenumi numele tabelei din Categories in Categorie folosind procedura stocata sp_rename:

Observam ca trebuie sa facem select pt.tabela Categorie acum deoarece tabela Categories nu mai exista.

Vom obtine acelasi output in cele 2 campuri CategoryID si CategoryName.poza3

b) Cum redenumim campul unei tabele (procedura stocata sistem sp_rename)

 

poza4

 

Efect:

 

poza5

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: