PHWinfo banniere

Titres
PORTAIL ANNUAIRE ARTICLES COMPARATEUR HÉBERGEURS DEVIS FORUMS RÉDUCTEUR D'URL
Précédent   PHWinfo > Autres forums > Forum Programmation & Conception > mysql.general > Re: change field types from several tables
S'inscrire FAQ Membres Recherche Messages du jour Marquer les forums comme lus
Re: change field types from several tables

Réponse
 
LinkBack Outils de la discussion
Vieux 02/01/2008, 00h16   #1
Baron Schwartz
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: change field types from several tables

Hi,

On Jan 1, 2008 6:22 PM, Miguel Vaz <dante@mail.telepac.pt> wrote:
>
> Hi,
>
> I am trying to import a big database of around 140 tables from xls
> to mysql. It works fine using navicat mysql, but i am running into a problem:
>
> Navicat tries to predict the field types, but makes a mistake on
> long text fields whose type needs to be "text", instead it makes them
> varchar(255), which is not enough for the content.
>
> I can solve the issue if i manually choose all field types to be
> "text", but since mysql has the alter table command to change field
> type, i was wondering if there is a way to change all fields from all
> tables to "text" automatically. This way i could import the table
> structure first, change all fields to type "text" and import tha data
> afterwards (the import is for an intermediary process, so no worries
> on all fields being "text" at this point).
>
> Something like:
>
> ALTER TABLE * CHANGE * * TEXT
>
> But obviously this doesnt work.
>
> Is this even possible using MYSQL? I could do it programmatically
> using PHP, i guess, but a single command would be far better. :-)


It's not possible.
  Réponse avec citation
Réponse


Outils de la discussion

Règles de messages
Vous ne pouvez pas créer de nouvelles discussions
Vous ne pouvez pas envoyer des réponses
Vous ne pouvez pas envoyer des pièces jointes
Vous ne pouvez pas modifier vos messages

Les balises BB sont activées : oui
Les smileys sont activés : oui
La balise [IMG] est activée : oui
Le code HTML peut être employé : non
Trackbacks are oui
Pingbacks are oui
Refbacks are oui


Fuseau horaire GMT +1. Il est actuellement 23h00.


Édité par : vBulletin® version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC5 Tous droits réservés.
Version française #16 par l'association vBulletin francophone
PHWinfo est un site Éducation Sans Frontières ©2000-2008
Ad Management by RedTyger
©Tous droits réservés par les parties respectives
Page generated in 0,08535 seconds with 9 queries