get columns number sql
#With SQL
SELECT count(*)
FROM information_schema.columns
WHERE table_name = 'Your_table_name';
get columns number sql
#With SQL
SELECT count(*)
FROM information_schema.columns
WHERE table_name = 'Your_table_name';
get columns number sql
//With JAVA
String quer="SELECT * FROM sample2 where 1=2";
Statement st=con.createStatement();
ResultSet rs=st.executeQuery(quer);
ResultSetMetaData rsmd = rs.getMetaData();
int NumOfCol=0;
NumOfCol=rsmd.getColumnCount();
System.out.println("Query Executed!! No of Colm="+NumOfCol);
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us