Advertisement
Larnu

UTF-8 No Repo

Apr 29th, 2024
572
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
T-SQL 0.52 KB | Source Code | 0 0
  1. CREATE DATABASE YourDatabase COLLATE Latin1_General_100_CI_AS_SC_UTF8;
  2. GO
  3. USE YourDatabase;
  4. GO
  5.  
  6. CREATE TABLE dbo.YourTable (SomeID int IDENTITY(1,1),
  7.                             YourString varchar(100));
  8. GO
  9.  
  10. INSERT INTO dbo.YourTable (YourString)
  11. VALUES('نورديا');
  12. GO
  13. DECLARE @YourString varchar(100);
  14. SET @YourString = 'نورديا';
  15.  
  16. INSERT INTO dbo.YourTable(YourString)
  17. SELECT @YourString;
  18. GO
  19.  
  20. SELECT SomeID,
  21.        YourString
  22. FROM dbo.YourTable;
  23. GO
  24.  
  25. USE master;
  26. GO
  27. DROP DATABASE YourDatabase;
  28. GO
Tags: sql
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement