HomeОбразованиеRelated VideosMore From: The Bad Tutorials

SQL Tutorial - 7: Data-Types in SQL (Part-2)

339 ratings | 95594 views
In this tutorial we';; check out the data type options we have available for use in SQL. We'll talk about Bigint, int, smallint, tinyint, decimal, number, float, char, varchar, blob, datetime, date, time and year.
Html code for embedding videos on your blog
Text Comments (24)
Sunil Singh (2 months ago)
Nice English with nice knowledge .thanks thank you very much
sanju madesha (6 months ago)
hey ! I just stored an image in my database using the blob datatype.. now when i try to retrieve it in matlab i am not able to.. while i can retrieve all other information present in my table but not the image.. can u provide some guidance relating to this?
niyomugabo emmanuel (1 year ago)
can you explain clearly?
Bharath kumar Reddy (1 year ago)
HI Madhur, I am using SQL server. Can you pls let me know how to add alphanumeric character into a column. which datatype has to be used while creating the table? I tried using VARCHAR datatype, but got an error while inserting DATA(O123) into the table.
Rozaq - SA78 (1 year ago)
Tanks Madhur, Your tutorials very useful for me. thank you very much. (Zack - Indonesia)
RASHU ANKALA (1 year ago)
insert into emp values(100,'steven','king','sking','1987-06-17','ad_pres',24000,3); sir i inserted like this but it is not executing pls help in oracle i did
dschiff (2 years ago)
Why use char at all if it wastes space compared to varchar?
Nikolai Kalashnikov (1 year ago)
If you were just storing known values, like for example, school grades (A, B, C, D, F), then I'm sure varchar would waste space... char data type would probably save space. I'm not sure what the exact implementation details are... but if i were to implement char & varchar, char would have ONE length field... Versus varchar... which would have either a length field PER ENTRY... or a null terminator for each value. Using the above specification & an example class size of 20 students, the amount of memory to store just their grades for the CHAR data type would be 20 bytes *plus* the size of the length field. The amount of memory to store the same data set using VARCHAR would be 40 bytes (each entry has a null terminator according to our specification) *plus* the size of the max_length field. You have a good question. Hopefully, my example specification & class room example didn't confuse you. I was just trying to show a situation in which CHAR is better than VARCHAR.
Akkere (1 year ago)
For variables that have a hard-coded minimum of characters, like character-IDs.
the end18 (2 years ago)
your english is very ugly.
Akkere (1 year ago)
His English is fantastic and he's one of the clearest tutorials on this subject out there.
viraj vasaikar (1 year ago)
i agree wid u marlene ..... can u help him dan ??? if not dan STFU!!!
بندر نايف (1 year ago)
So what?! You do not have to watch. I hate your kind . I do not know him and he is India and I am Saudi but you are a piece of sh..
saurav kumar (1 year ago)
it's u who is ugly
Syed Abdullah Khalid (1 year ago)
nice reply... ;D
saran naren (2 years ago)
HI, I have installed Microsoft SQLExpress. there after i dont what to click where to click to get SQL command prompt pls guide me
Tuhin Shaikh (2 years ago)
Good Job... Thanks a lot for the tutorials.
varanasi teja (3 years ago)
thanks madhur,well explained about difference between char and varchar.
Shariq Saifi (3 years ago)
very well explained... Thanks Madhur ... Do you also provide training on SQL ?
Monique Boea (3 years ago)
Hi Madhur. For the numeric datatypes, I typically use integer for everything, no matter the size. Does it matter to overall database performance to try to pick the most accurate?
kjanling (4 years ago)
ear values? :O

Would you like to comment?

Join YouTube for a free account, or sign in if you are already a member.