import java.util.*;
class SqlSyntax_1
{
public static void main(String[] args)
{
Scanner scanner=new Scanner(System.in);
System.out.println("enter id");
int id=scanner.nextInt();
System.out.println("enter name");
String name=scanner.next();
System.out.println("enter salary");
float salary=scanner.nextFloat();
String q2="insert into "+name+" values("+id+" ,'"+name+"',"+ salary+")";
System.out.println(q2);
}
}
Thanks
Happy programming!
class SqlSyntax_1
{
public static void main(String[] args)
{
Scanner scanner=new Scanner(System.in);
System.out.println("enter id");
int id=scanner.nextInt();
System.out.println("enter name");
String name=scanner.next();
System.out.println("enter salary");
float salary=scanner.nextFloat();
String q2="insert into "+name+" values("+id+" ,'"+name+"',"+ salary+")";
System.out.println(q2);
}
}
Thanks
Happy programming!
No comments:
Post a Comment