LEN vs DATALENGTH Function | CHAR vs VARCHAR | VARCHAR vs NVARCHAR | VARCHAR(n) vs VARCHAR(MAX)
Автор: Tech Point Fundamentals
Загружено: 2021-05-18
Просмотров: 830
LEN vs DATALENGTH Function | CHAR vs VARCHAR | VARCHAR vs NVARCHAR | CHAR vs NCHAR | VARCHAR(n) vs VARCHAR(MAX)
Agenda:
--------
Q01. What is the difference between LEN() and DATALENGTH() in SQL?
Q02. What is the difference between CHAR and VARCHAR data types in SQL?
Q03. What is the difference between CHAR and NCHAR data types in SQL?
Q04. What is the difference between VARCHAR and NVARCHAR data types in SQL?
Q05. What does the size 'n' define in CHAR(n) or VARCHAR(n) and NCHAR(n) and NVARCHAR(n) data types?
Q06. What is Collation and how it affects the data storage size?
Q07. Is the declaration of a field with VARCHAR(8500) is valid in SQL?
Q08. What is the difference between VARCHAR(n) and VARCHAR(MAX) in SQL?
Q09. Which data type can be used to store Unicode strings in SQL?
Q10. How many characters can be stored in Varchar(10) and Nvarchar(10) type field?
Q11. Can you define a field as CHAR(MAX) in SQL?
Q12. Can you create an Index on a column that is of VARCHAR(MAX) data type?
Q13. Which data type uses the LOB(Large Object) page to store the data? What can be the maximum size of LOB?
Q14. Why only a maximum of 8000 sizes can be stored in any string data type in SQL?
-- Get Current Collation
SELECT CONVERT (varchar(256), SERVERPROPERTY('collation'));
-- GET Current Collation Description
EXECUTE sp_helpsort;
-- Current Collation settings for the table fields
SELECT t.name TableName, c.name ColumnName, collation_name
FROM sys.columns c
inner join sys.tables t on c.object_id = t.object_id
WHERE t.name = 'tblName';
-- Changing the Collation for a column in table
ALTER TABLE Demo_SQLDataType ALTER COLUMN VarcharField VARCHAR(50) COLLATE SQL_Latin1_General_CP1_CS_AS;
Subscribe to our YouTube Channel: / @techpointfundamentals
Visit our Website for more Articles: https://www.techpointfunda.com
Recommended Videos Playlists:
============================================================
SQL Videos Playlist: https://www.youtube.com/embed/videose...
C# Interview Questions and Answers Videos Playlist: https://www.youtube.com/embed/videose...
Visual Studio Tips and Tricks Videos Playlist: https://www.youtube.com/embed/videose...
Interview Questions and Answers Videos Playlist: https://www.youtube.com/embed/videose...
C# Videos Playlist: https://www.youtube.com/embed/videose...
C# 8 Videos Playlist: https://www.youtube.com/embed/videose...
Recommended SQL Videos:
============================================================
SET Statements Part-2 video: • SET Statements Part-2 | CONCAT_NULL_YIELDS...
SET Statements Part-1 video: • SET Statements Part-1 | QUOTED_IDENTIFIER ...
Truncate vs Delete video: • DELETE vs TRUNCATE | DELETE Command | TRUN...
SubQuery vs CoRelated SubQuery: • SubQuery vs Co-Related SubQuery | SubQuery...
UNION vs UNION ALL video: • UNION vs UNION ALL | UNION OPERATOR | UNIO...
Recommended C# Interview Questions Videos:
============================================================
Sealed Method Interview Questions and Answers videos: • Sealed Method Interview Questions and Answ...
Sealed Class Interview QA Video: • Sealed Class Interview Questions and Answe...
Static Class Interview QA Video: • Static Class Interview Questions and Answe...
Abstract Class vs Interface Video: • Abstract Class Vs Interface C# 8 | Differe...
Recommended C# Videos:
============================================================
Shadowing or Method Hiding video: • Shadowing in C# | Method Hiding in C# | Te...
Virtual Methods and Method Overriding video: • Virtual Methods in C# | Method Overriding ...
Abstract Class and Methods video: • Abstract Class C# | Abstract Method C# | T...
Sealed Class Video: • Sealed Class and Sealed Methods in C# | Te...
Static Class Video: • Static Class, Static Constructor and Stati...
Virtual Interface Method Video: • Interface Virtual Members in C# 8 | Virtua...
Partial Classes Video: • Partial Classes with Real Examples in C# |...
Partial Methods Videos: • Partial Classes and Methods with live Exam...
Follow Us on Social Media Platforms:
============================================================
Follow us on Facebook: / techpointfundamentalsofficials
Visit our Facebook Page: / techpointfundamentals
Follow us on LinkedIn: / techpointfundamentals
Follow us on Telegram: https://t.me/TechPointFundamantals
Join our Telegram Interview Questions and Answers Group: https://t.me/InterviewQuestionsAndAns...
Follow us on VK: https://vk.com/techpointfundamentals
Follow us on Twitter: / techpointfunda
Follow us on Pinterest: / techpointfundamentals
Follow us on Instagram: / techpointfundamentals
Follow us on Mix: https://mix.com/techpointfundmentals
Follow us on Tumblr: / techpointfundamentals
Доступные форматы для скачивания:
Скачать видео mp4
-
Информация по загрузке: