THE SQL Code is as follows for without column No field:
SELECT ALSubject FROM Subject_Table
SUBJECTS
Accountancy
Applied Maths
Buniness Studies
Economics
Statistics
Zoology
*********************************************************
The code sql code with adding a column
method:-1
SELECT Row_Number() OVER (order by ALSubject asc) as ID,t.ALSubject As Name FROM ( SELECT ALSubject FROM Subject_Table) t
method:-1
SELECT Row_Number() OVER (order by ALSubject asc) as ID , ALSubject AS Name FROM Subject_Table where ALSubject<>'' group by ALSubject
ID NAME
1 Accountancy
2 Applied Maths
3 Business Studies
4 Economics
5 Statistics
6 Zoology
Subscribe to:
Post Comments (Atom)
SQL Query Stuff
1 . By using this query can search any string contain within stored procedure, function or view SELECT object_name(id) FROM sys.sysc...
-
" සිංහලේ ස්වාධීනත්වය යළිත් ළඟාකර දීමට සිංහලේ අනෙක් නායකයන් සමඟ එක් වී සටන් බිමට බැස්සෙමි . මවූබිම මූදා ලීමත් එමඟින් ...
-
කපන කපන වළ තුළ ගෙම්ඹන් නොලැබෙවා තබන තබන අඩිය ඉදිරියටම වේවා ගහන ගහන "අඩිය" භොදටම වෙරි වේවා ලැබු නව දවස සුබම සුබ දවසක් වේවා...
-
In the Following code i am going to generate a Grid view with dynamic check box columns. as u can seen on the picture...
No comments:
Post a Comment