intro to MySQL
intro to MySQL
Mmysar> SELES cgi Ce sae 2°) o/P hae? eee) er mmySau >? SELECT ROUND (6.619% 9317) yp TROND (6: 69989317) 7 POUND aistae 2 pen erin TRuvcae | Sans geetion WS Used to wetinn the we OF Wek Teorncatel fy noo deal places. on > AyD? J terto than the slecimal poi] 18 memovel » 24D? ho 0% values In integer.’ porct | its segative » #9 the “D” j 1 volue Is annealed + weet |Tromple Oo mmysbL.> SELECT TRUNCATE C gushed Result > 2" ELE TRUNCATE Resukd > 0 / 1. > SELECT TRUNCATE (arbi?) — C66teb 2) Regul —2 10d Resuld 260d mysaL > S (2656) o) My 80 > Ts panction “apes no ROUND ne” rothen. chops % § dyn 4 Number + > Tos pnetton trencartedl + pote ond time gunclions > Ths “pincton allows +0 pa sp PATE ype data » > The Aepoudt corty porno’ mysar 1s yy yy - MMe DD « > TH metunns curecent cdot I YYYY ~ m= Dp goamet on yyyy mMpD youre Aepending on whetnene the mello tg used tom A etrong. in a numenle — conteat + ' yonon cggenén) types Of tases rey sroople_ MySQL > ELEC! CURR ofp — | cunoaTe O | pate C)',. [rane ro pore _( 2aPu TH eatraety the data pact bum Ane det eral docio, tine, eaprsssion ' e my Sel? SEBLECT DATE ( "Qolg - 04-08? 131034”) pesult - ' 2lb- o4~0s’, mont Cao) qa metus +he Month ‘ number The range og-‘0? anol (OX og VS dota angurrent +gi > SELECT Month (% 019 - o¥-I6’)" Result - oy —_ i. mys mysee > SELES moniTH (IT = 01° \y’) Result - 06 pay of monn Colecte) | retunne te day of tHe mony con pe range of prong | | | | 1 fp ob gt dala rorgument + gronplé my Remecciech DAY oF month ( spit o¢- Is’) Result — lt pay of WEEK (Dae ) Bee uring tre Fay of the week Cin Ane Semen NONE > Tr cet ee ost por sundoy pore monday and % on tne sesomplt \ Pshls > SELECH = ON), OF ae =D (rl6— 6F-Ley Resudd <6 pry_vane_C ste qq cetunns TH day rame of its date argument . example My sQL> SELECT DAYNAME C rHIA - ok lo) | Result — Friday now (>) Bee > cetums tre current dole and time In yyy - MM-np WH mss nen used as a sircing » > Ty Numenie comes! It netumns a decimal nog ‘the gonum yyy DOHHMMSS example MyseL > seed Nowl) » Rew — rig OK 16 0% 470% Id fi: ie Ry rc 1” ‘Nowe Ye ee bwi(’) hegeeactean 170) oar iD t by Sainte ©enocily gymlan. te Mowl ) gun DTV netanny He value ‘V1 : 3 gyspane C) Function rating tne Ame ot which ,anctios engate 19vene AS apwe) > gunetion!-reTuans eo conctan aime tral Mndiecries the time od whieh Te statement b& gen wtp RAREIE vac Example MySGL_> SELECT SYSPATE / SLEEP C2) sys pate () >, apr Pte , a hah PrN? gap ant , cuties 5 emi thas” ea mappa os of Lime D6 thmePonopy Ri . aa. Masons: