1) Create Type ename FROM nvarchar(20) not null Create a type called called ename which has nvarchar(20) and not allowing nulls 2) Create table tab(id int,name ename) Create and insert data into the new table insert into tab(id,name) Select 1,'asdf' Union all Select 2,'badsf' Union all Select 3,'ertvfc' 3) Select * from tab 4) Drop table mytab; Drop Type MYTYPE Tags:User-Defined Table Types,Types,Types in sql server,sql server 2008 types
Thursday, 14 June 2012
Using of User defined data types in sql server 2008 example
Subscribe to:
Post Comments (Atom)
Parsing JSON w/ @ symbol in it
To read the json response like bellow @ concatenated with attribute '{ "@id": 1001, "@name&q...
-
Create table #States(StateID INT,StateName NVARCHAR(20)) INSERT INTO #States SELECT 1,'California' UNION SELECT 2,'Albama'...
-
Many one of used to create the drop down lists like this Select Region East India North East India North India South India West India Selec...
-
To read the json response like bellow @ concatenated with attribute '{ "@id": 1001, "@name&q...
No comments:
Post a Comment