Jump to content


Photo

Problemas com tipos, no mysql

Mysql tipos variavel group by

  • Faça o login para participar
8 replies to this topic

#1 shogun89

shogun89

    Normal

  • Usuários
  • 91 posts
  • Sexo:Masculino
  • Localidade:marilia

Posted 08/10/2015, 15:31

Sou um desenvolvedor que na maior parte do tempo utilizou o SQL Server nas suas aplicações.

Recentemente, comecei a utilizar o MySql, e me deparei com algumas situações curiosas, desde, campos "not null" permitindo nulos, até campos "char(5)", por exemplo, permitindo 3 caracteres...

 

Fico curioso com isso, pois não entendo a causa destas "falhas".

Como no SQL Server isto não é possível, me perco as vezes nas opções que tenho para uma simples query.

 

Um outro exemplo que me deparei hoje foi no caso do "group by".

No SQL Server, todos os campos selecionados devem constar no group by, já no MySql, não tive este problema.

 


#2 Danilomaru

Danilomaru

    Ativo

  • Moderadores
  • 300 posts
  • Sexo:Masculino
  • Localidade:brasil

Posted 17/10/2015, 01:53

Ao especificar um campo com tipo char(5) ainda que insira um registro, por exemplo, somente com um caractere, ele irá gravar sem problemas (ex: 'a     '), ou seja, ainda que o campo seja char(200) e você gravar um registro com apenas um caractere, será ocupado todos os bytes smile.png

 

not null

 

Muitos confundem isso ( not null != '' )

Faça um teste no console do mysql.

mysql> SELECT LENGTH('');
-> 0
mysql> SELECT LENGTH(null);
-> NULL


#3 Miguceamma

Miguceamma

    MiguPenjisse

  • Usuários
  • 13201 posts

Posted 10/10/2017, 10:22

Amoxicillin Allergy Cost Of Nexeum In Canada generic levitra shipped from usa Buy Doxycycline Singapore Hydrochlorothiazide Visa Arun Fast Delivery For Flagyl
Originale Kamagra Zithromax Label Female Viagra Buy 40 mg levitra pills on line for sale Amoxicillin Prophylaxis Allergic To Penecillin
Photo Of Amoxicillin West Amoxicillin Bronchitis levitra and cialis online Levitra Flussig
Levitra Cialis Generico Canine Moist Dermatitis Cephalexin Dosage online pharmacy Cialis 10mg Efficacite
Buy Metformin Without Doctor viagra Amoxil False Positive Urine Test
Cialis Kohlpharma Gmbh Cialis With Prescription viagra prescription Potenzmittel Cialis Lilly

#4 Miguceamma

Miguceamma

    MiguPenjisse

  • Usuários
  • 13201 posts

Posted 27/10/2017, 22:57

Cheap Genuine Kamagra Cialis Canada Generic viagra prescription Propecia Preis 98 Cialis 5 Mg Ansia Levitra Que Precio Tiene

#5 Miguceamma

Miguceamma

    MiguPenjisse

  • Usuários
  • 13201 posts

Posted 07/11/2017, 20:59

Amoxicilline Somnolence Keflex And Holy Basil Zithromax Sexually Transmitted Disease levitra online Viagra Versand Vergleich Achat Cialis Soft Quel Site
Kamagra Next Day Cialis Medicamento Buy Metoprolol Without A Prescription levitra pro pas cher Kamagra Liquide Buy Generic Viagra Online Uk
Reliable Source For Dapoxetine Cialis Kaufen In Deutschland viagra Propecia Aumento Massa Cialis Y Dolor De Cabeza Super Kamagra Nebenwirkungen
Erectile Dysfunction Pills cialis Cialis Vs Levitra

#6 Miguceamma

Miguceamma

    MiguPenjisse

  • Usuários
  • 13201 posts

Posted 03/09/2022, 01:45

has requested an edict to enter the army stromectol cream

#7 JeffMalm

JeffMalm

    Super Veterano

  • Usuários
  • 12254 posts
  • Sexo:Feminino
  • Localidade:Mount Carey

Posted 11/09/2022, 10:23

clomiphene and gonadotropins Il also do a 4 week and 8 blood test to see how my body responses.

#8 JeffMalm

JeffMalm

    Super Veterano

  • Usuários
  • 12254 posts
  • Sexo:Feminino
  • Localidade:Mount Carey

Posted 09/12/2022, 09:29

The trial enrolled 18 patients, ages 20 65 years, who could still breathe independently and had no mutations in the FUS or SOD1 genes cialis generic best price Donnie rXkOZFHIKaAEWWpcs 5 19 2022

#9 Miguceamma

Miguceamma

    MiguPenjisse

  • Usuários
  • 13201 posts

Posted 10/02/2023, 13:53

Shaddy RE, Boucek MM, Sturtevant JE, et al viagra online pharmacy
Tamoxifen citrate tablets can stop hormonal birth control methods from working cost of lasix
The recall also comes on the heels of the recent agreement between the U nolvadex
AA was induced in Lewis rats with Mycobacterium butyricum in paraffin oil injected into the base of the tail, and the animals were treated with idoxifene prophylactically days 0 21 or therapeutically days 10 21 kamagra india
real cialis online Although there have been sporadic reports on central respiratory depression after systemic use of this compound, appropriately administered morphine is considered a relatively safe medication 3
They moved to San Francisco, California, where two of their sons, Steve and Bruce, were born while Art was serving in the United States Army nolvadex 10mg tablet In certain embodiments of the invention a patient would be identified and or selected who has one or more diseases of cancer or autoimmunity or infection





Veja alguns posts relacionados com: Mysql, tipos, variavel, group by

1 user(s) are reading this topic

0 membro(s), 1 visitante(s) e 0 membros anônimo(s)

IPB Skin By Virteq