Data type length enforcement
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-15-2023 05:56 AM
Hello. Is there a way to enforce the length of a column in SQL? For example that a column has to be exactly 18 characters? Thank you!
- Labels:
-
Column
-
Community Edition
-
Data
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-23-2023 12:20 AM
Hi @Kaniz Fatma. Thank you for your feedback. However, my question is if we can enforce a column to have exactly a number of characters, not less than a number. For example an iban needs to have exactly 34 chars, not less than 34 not more than 34.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-23-2023 01:50 AM
Thank you @Kaniz Fatma. This is exactly what I was looking for.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-03-2024 11:26 PM
we are facing similar issues while write into adls location delta format, after that we created on top delta location unity catalog tables. below format of data type length should be possible to change spark sql supported ?
Azure SQL Spark SQL supported ?
column1 nvarchar(5) --> column1 <how to set custome datatype length>
startdate datetime2 ----> startdate <how to set custome datatype length>
enddate datetime2(0) ---> enddate <how to set custome datatype length>