DelphiFAQ Home Search:

How can I rename table names and column names in mysql

 

comments26 comments. Current rating: 5 stars (9 votes). Leave comments and/ or rate it.

If only a few changes are necessary, you can just go through a web administration tool like phpAdmin.

If you have many names to change, you could write a script (possibly even generate a script by a tool) and execute it like this:

mysql DATABASENAME -uUSERNAME -pPASSWORD <SCRIPTFILE

The script would contain the SQL commands as shown here:

alter table orgs change o_id org_id int(11);
alter table orgs change o_name org_name varchar(64);
rename table orgs organizations;

Content-type: text/html

Comments:

You are on page 2 of 2, other pages: 1 [2]
2010-01-23, 07:33:42
anonymous from Bombay, India  
rating
Thanks dude
2010-01-29, 21:52:36
anonymous from United States  
Thanks!
2010-02-07, 23:03:47
anonymous from United States  
rating
This is wrong and will give error:

rename table orgs organizations;



Should be:

rename table orgs to organizations;
2010-02-25, 01:57:07
anonymous from United States  
the answer is here

if you are using Mysql server 5.0 then commad is gonna be like this

ALTER TABLE TABLE-NAME CHANGE OLD-COLUMN-NAME NEW-COLUMN-NAME VARCHAR(64);

for example you have a table named FilmCategory in a database named FilmClub and you by mistake named one of the columns of table FilmCategory as Categorid but you want to change it to CategorYid ,,,cause Y was missing, so , you can do the changes like this______

ALTER Table FilmCategory CHANGE Categorid Categoryid varchar(64);

and it will be done,,,,note this works for Mysql server 5.0 perfectly fine.



If it helped you , you can leave me a message at sandhusoorma@gmail.com, IF YOU NEED ANY HELP , IWILL TRY MY BEST IN CASE OF MYSQL...

KEEP PROGRAMMING,,,,,
2010-03-26, 02:55:49
acidbala@yahoo.com from Madras, India  
rating
hai...its good for quick reference...thnx...
2010-03-27, 09:37:47
anonymous  
rating
bloody good
2010-04-02, 12:13:39
anonymous from Netherlands  
what stupid false info is this !


go rtfm you idiot
2010-05-25, 01:49:24
anonymous  
rating
http://www.onThesource.com Wholesale Electronics by PayPal
[Cell Phones] http://onthesource...e-phones/
36. [Quad Band & Tri-band Phones] http://onthesource...ll-phone/
37. [TV Mobile Phones] http://onthesource...e-phones/
38. [Dual SIM Mobile] http://onthesource...m-mobile/
39. [Watch Cell Phones] http://onthesource...l-phones/
40. [Cell Phone Accessories] http://onthesource...essories/
41. [Data Cables] http://onthesource...a-cables/
42. [Earphones] http://onthesource...arphones/
43. [Li-ion Batteries] http://onthesource...atteries/
44. [Replacement Parts] http://onthesource...nt-parts/
45. [iPhone & iPod Accessories] http://onthesource...essories/
46. [iPhone Case] http://onthesource...one-case/
47. [iPhone Data Cable] http://onthesource...ta-cable/
48. [iPhone Chargers] http://onthesource...chargers/
49. [PC Peripheral] http://onthesource...ripheral/
50. [Flash Memory Drives] http://onthesource...y-drives/
51. [Mouse & Keyboard] http://onthesource...keyboard/
52. [Webcam] http://onthesource...l/webcam/
53. [Cooling Pad] http://onthesource...ing-pad-/
54. [Memory Cards] http://onthesource...ry-cards/
55. [MMC Cards] http://onthesource...mc-cards/
56. [SD Cards] http://onthesource...sd-cards/
57. [Micro SD/TF Card] http://onthesource...ry-cards/
58. [Mini SD Cards] http://onthesource...sd-cards/
59. [Stick Pro Duo] http://onthesource...-pro-duo/
60. [Games Accessories] http://onthesource...essories/
61. [Games DVD] http://onthesource...ames-dvd/
62. [MP4 Players] http://onthesource...-players/
63. [Bluetooth Devices] http://onthesource...-devices/
64. [Bluetooth Earphone] http://onthesource...headsets/
65. [Bluetooth Dongle] http://onthesource...adapters/
66. [Bluetooth Car Kits] http://onthesource...car-kits/
67. [Solar Chargers] http://onthesource...chargers/
68. [Car Electronics] http://onthesource...ctronics/
69. [Car FM MP3 Transimitter] http://onthesource...simitter/
70. [Notebook Accessories] http://onthesource...essories/
71. [LED Flashlights] http://onthesource...shlights/
72. [Software] http://onthesource...software/
73. [Adobe Software] http://onthesource...re/adobe/
74. [Operation System] http://onthesource...on-system/


Keywords:
2010-06-03, 12:16:13
anonymous  
stick it up your ass you prick
2012-11-21, 06:02:02
anonymous from Zimbabwe  
sp_RENAME 'adna' , 'adan'


Keywords:
2017-08-23, 02:01:54
anonymous from Indonesia  
kami sekeluarga tak lupa mengucapkan puji syukur kepada ALLAH S,W,T
dan terima kasih banyak kepada NYAI atas nomor togel.nya yang NYAI
berikan 4 angka 9050 alhamdulillah ternyata itu benar2 tembus NYAI.
dan alhamdulillah sekarang saya bisa melunasi semua utan2 saya yang
ada sama tetangga.dan juga BANK BRI dan bukan hanya itu NYAII. insya
allah saya akan coba untuk membuka usaha sendiri demi mencukupi
kebutuhan keluarga saya sehari-hari itu semua berkat bantuan NYAII..
sekali lagi makasih banyak ya NYAI… bagi saudara yang suka main togel
yang ingin merubah nasib seperti saya silahkan hubungi NYAI RONGGENG,,di no (((082-189-481-547)))
insya allah anda bisa seperti saya…menang togel 275
juta, wassalam.

dijamin 100% jebol saya sudah buktikan…sendiri….

Apakah anda termasuk dalam kategori di bawah ini !!!!

1?Dikejar-kejar hutang

2?Selaluh kalah dalam bermain togel

3?Barang berharga anda udah habis terjual Buat judi togel

4?Anda udah kemana-mana tapi tidak menghasilkan solusi yg tepat

5?Udah banyak Dukun togel yang kamu tempati minta angka jitunya
tapi tidak ada satupun yang berhasil..

Solusi yang tepat jangan anda putus asah….NYAI RONGGENG akan membantu
anda semua dengan Angka ritwal/GHOIB:
butuh angka togel 2D 3D 4D SGP / HKG / MALAYSIA / TOTO MAGNUM / dijamin
100% jebol
Apabila ada waktu
silahkan Hub: NYAI RONGGENG DI NO: (((082-189-481-547)))

angka GHOIB: singapur 2D/3D/4D/

angka GHOIB: hongkong 2D/3D/4D/

angka GHOIB; malaysia

angka GHOIB; toto magnum 4D/5D/6D/

angka GHOIB; laos 4D/6D/8D/

Angka GHOIB; thailan 2D/3D/

Angka GHOIB; macau 2D/3D/4D/

Angka GHOIB; sidney 2D/3D/4D/

DEMI ALLAH INI ADALAH KISAH NYATA SAYA
INI ASLI, BUKAN REKAYASAH !!?.;.
This image was also posted here:
The UK NATIONAL LOTTERY scam
The UK NATIONAL LOTTERY scam
How to run a *.sql script (mysql)
Dating scammer Rose James
DelphiFAQ Site wide search function
Various dating scammers
mysql: How can I rename a database



Keywords:
You are on page 2 of 2, other pages: 1 [2]

 

 

NEW: Optional: Register   Login
Email address (not necessary):

Rate as
Hide my email when showing my comment.
Please notify me once a day about new comments on this topic.
Please provide a valid email address if you select this option, or post under a registered account.
 

Show city and country
Show country only
Hide my location
You can mark text as 'quoted' by putting [quote] .. [/quote] around it.
Please type in the code:

Please do not post inappropriate pictures. Inappropriate pictures include pictures of minors and nudity.
The owner of this web site reserves the right to delete such material.

photo Add a picture: